comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Y-Axis: Negitive numbers on top
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Y-Axis: Negitive numbers on top [message #1515] Wed, 01 December 1993 15:00
landers is currently offline  landers
Messages: 45
Registered: May 1993
Member
Gee, I don't know about IDL, but in PV-WAVE you just use something like

PLOT, stuff, YRANGE=[1,-9], etc...
Re: Y-Axis: Negitive numbers on top [message #1529 is a reply to message #1515] Tue, 30 November 1993 15:13 Go to previous message
Ann_Mazuk is currently offline  Ann_Mazuk
Messages: 5
Registered: November 1993
Junior Member
In article <2dgd4b$1t6@news.u.washington.edu>, deutsch@astro.washington.edu
(Eric Deutsch) wrote:

> 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?

Many people have sent me email (thanks!) with what is probably the easiest
solution. That is to do:

IDL> plot,x,y,yrange=[2,-9]

Ann

>
> Eric
>
>
>
> Eric Deutsch Email: deutsch@astro.washington.edu
> Department of Astronomy FM-20 Voice: (206) 543-1979, 2922
> University of Washington FAX: (206) 685-0403
> Seattle, WA 98195 Johnson Hall, Room 226

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
Ann Mazuk Internet:
Ann_Mazuk@qmail2.aero.org
El Segundo, CA SPAN: DIRAC2::AMAZUK
Boring Disclaimer: These opinions are my own!

Zak! Don't eat parsley! Just for looks!
Re: Y-Axis: Negitive numbers on top [message #1531 is a reply to message #1529] Tue, 30 November 1993 13:14 Go to previous message
deutsch is currently offline  deutsch
Messages: 19
Registered: February 1992
Junior Member
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



Eric Deutsch Email: deutsch@astro.washington.edu
Department of Astronomy FM-20 Voice: (206) 543-1979, 2922
University of Washington FAX: (206) 685-0403
Seattle, WA 98195 Johnson Hall, Room 226
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Y-Axis: Negitive numbers on top
Next Topic: Image processing packages using IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 03:11:49 PDT 2025

Total time taken to generate the page: 0.00776 seconds