Re: Y-Axis: Negitive numbers on top [message #1519] |
Wed, 01 December 1993 13:56 |
sterner
Messages: 106 Registered: February 1991
|
Senior Member |
|
|
deutsch@astro.washington.edu (Eric Deutsch) writes:
> In article 301193095555@bundy.aero.org, Ann_Mazuk@qmail2.aero.org (Ann Mazuk) writes:
>> I am running IDL 3.1.0 using VAX/VMS. I am making a plot and on the y-axis
>> I want negative numbers to be near the top of the y-axis and positive
>> numbers to be near the bottom of the y-axis, such that it looks similar to
>> this:
>>
. . .
> The initial solution is simply to use something like:
> IDL> plot,indgen(10)-8,yrange=[2,-10]
> The tricky part comes when you want to have automatic Y scaling and have it
> reversed. An ugly solution is:
> IDL> plot,indgen(10)-8
> IDL> plot,indgen(10)-8,yr=[!y.crange([1,0])]
> Anyone have a better solution?
I just use plot,x,y,yran=[max(y),min(y)]
Ray Sterner sterner@tesla.jhuapl.edu
Johns Hopkins University North latitude 39.16 degrees.
Applied Physics Laboratory West longitude 76.90 degrees.
Laurel, MD 20723-6099
|
|
|
Re: Y-Axis: Negitive numbers on top [message #1528 is a reply to message #1519] |
Tue, 30 November 1993 15:30  |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
deutsch@astro.washington.edu (Eric Deutsch) writes:
> In article 301193095555@bundy.aero.org, Ann_Mazuk@qmail2.aero.org (Ann Mazuk) writes:
>> I am running IDL 3.1.0 using VAX/VMS. I am making a plot and on the y-axis
>> I want negative numbers to be near the top of the y-axis and positive
>> numbers to be near the bottom of the y-axis, such that it looks similar to
>> this:
>>
>>
>> -3 |
>> -2 |
>> -1 |
>> 0 |
>> 1 |
>> 2 |__________________________
>> 1 2 3 4 5 6 7 8 9 10
> The initial solution is simply to use something like:
> IDL> plot,indgen(10)-8,yrange=[2,-10]
> The tricky part comes when you want to have automatic Y scaling and have it
> reversed. An ugly solution is:
> IDL> plot,indgen(10)-8
> IDL> plot,indgen(10)-8,yr=[!y.crange([1,0])]
> Anyone have a better solution?
> Eric
Why not just
IDL> Y = INDGEN(10)-8
IDL> PLOT, Y, YRANGE=[max(Y),min(Y)]
Bill Thompson
|
|
|