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

Home » Public Forums » archive » Re: Reverse axis,
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: Reverse axis, [message #12643] Mon, 10 August 1998 00:00
badastro is currently offline  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 Go to previous message
badastro is currently offline  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 Go to previous message
davidf is currently offline  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 Go to previous message
Liam Gumley is currently offline  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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Scientific Programmer position available
Next Topic: Re: Widget_List question ...

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

Current Time: Wed Oct 08 13:43:08 PDT 2025

Total time taken to generate the page: 0.00624 seconds