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

Home » Public Forums » archive » Axis labeling trickery
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Axis labeling trickery [message #85785 is a reply to message #85784] Sat, 07 September 2013 12:56 Go to previous messageGo to previous message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
Hi,

I am not sure to understand the problem but I know that label_date can
be very annoying sometimes ...

What about doing the same, but without label_date?

time = timegen(120,start=julday(1,1,2003), units='M', step_size=1)
data = 20*randomu(seed,n_elements(time))-10
; Without "label_date"
x_name = STRING(INDGEN(11) + 2003, FORMAT='(I04)')
x_locs = timegen(11,start=julday(1,1,2003), units='Y', step_size=1)
cgPlot, time, data, xrange=[julday(1,1,2003),julday(1,1,2013)], $
XTICKV=x_locs, XTicks=10, XTICKNAME=x_name

Cheers,

Fab

On 09/07/2013 09:47 PM, Paul Levine wrote:
>
> Either way, though, the problem with setting XTicks = 9 is that while
> the year labels print what I want, the tick marks themselves are no
> longer spaced one year apart on January 1 of each year. Running the
> same code above but with Date_Format='%M %D %Y') and XTicks=9
> illustrates why I need 10 rather than 9 tick intervals.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: really dumb widget question
Next Topic: Unable to allocate memory

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

Current Time: Wed Oct 08 17:28:54 PDT 2025

Total time taken to generate the page: 0.00413 seconds