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

Home » Public Forums » archive » Re: Time axis labelling (1 major label every 7 days with 6 minor ticks)
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: Time axis labelling (1 major label every 7 days with 6 minor ticks) [message #60347] Mon, 19 May 2008 04:42
Patrique is currently offline  Patrique
Messages: 3
Registered: May 2007
Junior Member
On 19 Mai, 12:12, FĂ–LDY Lajos <fo...@rmki.kfki.hu> wrote:
> On Mon, 19 May 2008, Patrique wrote:
>> Dear all,
>
>> I'm currently trying to figure out how to make IDL to draw a time axis
>> reaching from 14 Jan to 18 Feb 2008 (exactly 5 weeks) with major ticks
>> each 7 days and 6 minor ticks in between so that there is a tick label
>> each full week. I already tried a lot of different things, but nothing
>> really worked. In my IDL Version (6.4) even the spacing of the tick
>> marks varies along the x axis when running the example below.
>
>> Can someone of you give me any hint on how to manage this issue ?
>
>> pro test
>> ;xaxis: start on 14 Jan, end on 18 Feb
>> time = FINDGEN(36)+JULDAY(01,14,2008,00,00)
>> ;yaxis values
>> Values = RANDOMN(seed,36)
>
>> ;axis formatting
>> !X.TICKFORMAT = ['LABEL_DATE']
>> !X.TICKUNITS =['Time']
>> dummy=LABEL_DATE(DATE_FORMAT = '%D.%N.%Y!C%H:%I')
>
>> ;plotting
>> PLOT,time,values, XSTYLE=1, YSTYLE=1, XTICKS=5
>> end
>
>> Best regards and thanks for your help,
>> Patric.
>
> Do it manually. it takes much less time :-)
> (if you need this only once)
>
> pro test
> ;xaxis: start on 14 Jan, end on 18 Feb
> time = FINDGEN(36)
> ;yaxis values
> Values = RANDOMN(seed,36)
>
> ;plotting
> PLOT,time,values, XSTYLE=1, YSTYLE=1, XTICKS=5,
> xtickname=['14-jan-2008!C12:00', $
> '21-jan-2008!C12:00', $
> '28-jan-2008!C12:00', $
> '04-feb-2008!C12:00', $
> '11-feb-2008!C12:00', $
> '18-feb-2008!C12:00'],$
> xminor=7
> end
>
> regards,
> lajos

Thank you, Lajos.
This workaround seems to be a good solution for my needs.

Regards,
Patric.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Time axis labelling (1 major label every 7 days with 6 minor ticks)
Next Topic: How to add a scalebar on a map graphic?

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

Current Time: Wed Oct 08 18:13:56 PDT 2025

Total time taken to generate the page: 0.00523 seconds