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 #85795 is a reply to message #85785] Mon, 09 September 2013 14:59 Go to previous messageGo to previous message
Paul Levine is currently offline  Paul Levine
Messages: 29
Registered: February 2008
Junior Member
On 2013-09-07 19:56:40 +0000, Fabien said:

> 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

Thank you for the suggestion. But that gives the same result as my
first example

time = timegen(120,start=julday(1,1,2003), units='M', step_size=1)
data = 20*randomu(seed,n_elements(time))-10
void = Label_Date(Date_Format='%Y')
cgPlot, time, data, xrange=[julday(1,1,2003),julday(1,1,2013)],
XTickFormat='Label_Date', XTicks = 10

in which there is a label at the "end" of the x-axis for the 11th year.
I guess what I am wanting to do is to have 10 tick intervals, but only
10 labels, with the 11th tick mark remaining unlabeled. If it can't be
done from within the plot or axis routines, I will just have to use
xyouts (or cgText).
[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 18:18:35 PDT 2025

Total time taken to generate the page: 0.00461 seconds