Re: plotting xaxis with date [message #75643] |
Tue, 15 March 2011 07:04 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
sid writes:
> I have x axis as years that is,
> for example,
>
> 21223
> Here 2 corresponds to year 12 is month and 23 is day
> now using this below commands, I have done
> yy=strmid(p1(1),7,1)
> mm=strmid(p1(1),8,2)
> dd=strmid(p1(1),10,2)
> s=strcompress(dd+'/'+mm+'/'+'200'+yy,/remove_all)
> and now s=23/12/2002
> like this I have converted my x axis values from 21223.
> But now i need to plot this dates in xaxis with corresponding yaxis
> data.
> How to do this?
Use the keyword XTICKNAME. You may also have to use
the XTICKV and XTICKS keywords to get things aligned
properly. It would be better to turn your date into
a Julian number, then use Label_Date to label your
axis.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|