Re: plot axis problem? [message #55102] |
Wed, 01 August 2007 08:14  |
rkombiyil
Messages: 59 Registered: March 2006
|
Member |
|
|
On Aug 1, 9:03 pm, Wox <nom...@hotmail.com> wrote:
> On Wed, 01 Aug 2007 10:18:06 +0200, Wox <nom...@hotmail.com> wrote:
>> Well, you could change the tick names
>
> By accident I also stumbled on this:http://star.pst.qub.ac.uk/idl/Displaying_DateTime_Data_ on_Axis_Object...
Well, thanks for taking time off to help and the link! Two things, if
I may.
#1. The above code needs a minor modification to plot correctly, since
n_elements(time) = 10, I would need to add:
<code>
plot,time2,field,xticks=9,XTICKN=strtrim(fix(time),2)+'hrs'
</code>
to plot correctly.
#2. My time arrays are rather large. I actually did a reverse when I
ran into this problem, as in setting:
<code>
time_array[where(time_array ge 24.)]=time_array[where(time_array ge
24.)]-24.
</code>
Anyway, I should admit that it was clever of you to think of changing
the ticknames, reminds me that I should RTFM more.. I haven't thought
of that at all. Since the whole point was to make it more "human
readable" as in resetting time to be 000hrs at midnight and then
increase, I guess for plot purposes, your method would suffice!
Because all I need is to display as above, nothing changes, except the
format of the time displayed :-)
Thanks,
/rk
|
|
|