Re: Reverse axis, [message #12643] |
Mon, 10 August 1998 00:00 |
badastro
Messages: 7 Registered: August 1998
|
Junior Member |
|
|
In comp.lang.idl-pvwave Philip Plait <badastro@smart.net> wrote:
> In comp.lang.idl-pvwave David Fanning <davidf@dfanning.com> wrote:
>> Lars Hanson (root@tesla.drcmr.dk) writes:
>>> I need the functionality of the PLOT function
>>> PLOT, X, Y
>>> but with the x-axis inverted (decreasing values
>>> from left to right). There must be a simple general way,
>>> but I can't find it. Any ideas?
>> PLOT, X, Y, XRANGE=[100,0]
> I have done this too, as well as
> IDL> plot reverse(x), y
As Dave Fanning just pointed out to me, this probably won't work for you.
Where I use it is a special case, and it does what I need. In most
cases, you can probably take Dave's advice. ;-)
* * * * * The Bad Astronomer * * * *
Phil Plait badastro@smart.net
The Bad Astronomy Web Page: http://smart.net/~badastro/bad.html
|
|
|
Re: Reverse axis, [message #12644 is a reply to message #12643] |
Mon, 10 August 1998 00:00  |
badastro
Messages: 7 Registered: August 1998
|
Junior Member |
|
|
In comp.lang.idl-pvwave David Fanning <davidf@dfanning.com> wrote:
> Lars Hanson (root@tesla.drcmr.dk) writes:
>> I need the functionality of the PLOT function
>> PLOT, X, Y
>> but with the x-axis inverted (decreasing values
>> from left to right). There must be a simple general way,
>> but I can't find it. Any ideas?
> PLOT, X, Y, XRANGE=[100,0]
I have done this too, as well as
IDL> plot reverse(x), y
* * * * * The Bad Astronomer * * * *
Phil Plait badastro@smart.net
The Bad Astronomy Web Page: http://smart.net/~badastro/bad.html
|
|
|
Re: Reverse axis, [message #12659 is a reply to message #12643] |
Fri, 07 August 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Lars Hanson (root@tesla.drcmr.dk) writes:
> I need the functionality of the PLOT function
> PLOT, X, Y
> but with the x-axis inverted (decreasing values
> from left to right). There must be a simple general way,
> but I can't find it. Any ideas?
PLOT, X, Y, XRANGE=[100,0]
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: Reverse axis, [message #12666 is a reply to message #12659] |
Fri, 07 August 1998 00:00  |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
> I need the functionality of the PLOT function
> PLOT, X, Y
> but with the x-axis inverted (decreasing values
> from left to right). There must be a simple general way,
> but I can't find it. Any ideas?
Reverse the order of the XRANGE vector, e.g.
plot, indgen(10), xrange=[10,0]
Cheers,
Liam.
|
|
|