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

Home » Public Forums » archive » Re: overwriting x axis labels
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: overwriting x axis labels [message #49208] Thu, 06 July 2006 15:01
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
or this is a bit tidier:

plot, indgen(n_elements(time)), data, xtickname=strtrim(time,2)
Re: overwriting x axis labels [message #49209 is a reply to message #49208] Thu, 06 July 2006 14:58 Go to previous message
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
Is this what you're looking for?

time=[12,24,0,6]
data=[12,43,65,4]
plot,indgen(n_elements(time)), data, xtickname=time

regards,
Greg
Re: overwriting x axis labels [message #49211 is a reply to message #49209] Thu, 06 July 2006 14:04 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
rita writes:

> It seem that IDL always plots and labels the x axis as minumum to
> maximum.
> Is there a way to overwrite this?

I'd try:

Plot, data, xrange=[max(x), min(x)]
>
> I am trying to contour some time dependent data
> Say I have a vector "time" and time =[ 12 24 0 6] representing hours
>
> IT seems that regardless of the order of the elements in TIME, IDL will
> draw the x axis from min(TIME) to max(TIME)

Humm. Are you sure you are talking about the X axis?
Doesn't the independent data axis *always* have to be
a monotopicly increasing vector?

Sounds to me like IDL might be doing something reasonable,
although I can't tell for sure without seeing your actual
code.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IVolume/isosurface
Next Topic: Reading data from file

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

Current Time: Wed Oct 08 19:15:28 PDT 2025

Total time taken to generate the page: 0.00482 seconds