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

Home » Public Forums » archive » Plot with X-Axis ticks as string
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: Plot with X-Axis ticks as string [message #92646 is a reply to message #92645] Mon, 01 February 2016 08:31 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Actually, since you're using function graphics, have a look at the C()
format codes:
http://www.exelisvis.com/docs/format_codes.html#files_283972 0996_2823814

But, again, I think label_date() is what you need.

For example in some of my code I do:

; Set up the date labeling
date_label = LABEL_DATE(DATE_FORMAT='%D %M!C%Y')

and then

tp[i] = PLOT( date_time, timing[*,i], $
TITLE='Host : ' + host + '!C' + $
'CRTM root : ' + crtm_root + '!C' + $
'Sensor Id : ' + sensor_id + '!C' + $
'CRTM version : ' + crtm_version + '!C' + $
'Current Date : ' + SYSTIME(), $
XTITLE='Date', $
YTITLE='Run time (sec.)', $
XTICKFORMAT='LABEL_DATE', $
/XSTYLE, $
...etc...

See the value for XTICKFORMAT?

cheers,

paulv

On 02/01/16 11:26, Paul van Delst wrote:
> Hello,
>
> Have a look at:
>
> http://www.exelisvis.com/docs/LABEL_DATE.html
>
>
> Also, playing around with user-defined functions for tick labeling might
> be useful (although I think the above is what you need). See:
>
> http://www.exelisvis.com/docs/graphkeyw.html#graphkeyw_32887 78166_370350
>
> in particular the section titled: "The name of a user-defined function:"
>
> cheers,
>
> paulv
>
> On 01/31/16 04:44, Kai Heckel wrote:
>> Am Dienstag, 26. Januar 2016 13:58:30 UTC+1 schrieb Kai:
>>> Hello everyone!
>>>
>>> I'd like to plot monthly values of a parameter. The months go from
>>> Arpil to November. How can I implement ticks at the x-axis which
>>> are simple strings, e.g. 'Apr', 'May' .....
>>>
>>> So I plotted something and I tried to add a fitted x-axis to the
>>> plot as follows:
>>>
>>> myplot_c1 = PLOT(parameters,
>>> NAME='Cluster',COLOR='red',XTEXT_COLOR='white', YSTYLE=2, XSTYLE=3,
>>> YTITLE='Parameter',MIN_VALUE=-1, MAX_VALUE=1,
>>> XTICKINTERVAL=1,YRANGE=[0.15,0.5])
>>>
>>> xax =
>>> AXIS('X',LOCATION=[0,0.15],TICKVALUES=['Mar','Apr','May','Ju n','Jul','Aug','Sep','Oct'],
>>>
>>> MINOR=1, MAJOR=-1, TICKLEN=0.015,TICKFONT_SIZE=11,TICKINTERVAL=1)
>>>
>>> Somehow the monthly ticks just won't appear.
>>>
>>> Any suggestions?
>>>
>>> Cheers, Kai
>>
>> Does no one have any suggestions?
>>
>> Regards, Kai
>>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: assigning integer and string value to same variable one by one
Next Topic: Nice bridges

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

Current Time: Wed Oct 08 17:30:59 PDT 2025

Total time taken to generate the page: 0.00420 seconds