comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Retrieving labels of tick marks
items: Re: Retrieving labels of tick marks

Retrieving labels of tick marks
type: item
description: Hi, I was wondering if it is possible to retrieve the string array of the tick labels that IDL generates for a plot? As far as I know, one may retrieve the tick values with tick_get. What I want to do is to modify the output of label_date. For the day number, LABEL_DATE outputs only the day of month, but sometimes I prefer to have the day of year (e.g. 184/2014 instead of 01-Jul-2014). My idea is to retrieve the output of LABEL_DATE and replace the month/day-of-month with DOY, using one of the JHUAPL routines. Do you suggest a different method otherwise? Thanks.
creator: elias
date: 2014-08-26T21:10:49-00:00

Re: Retrieving labels of tick marks
type: item
description: You can write your own tick-label formatting function. Say your time axis is given in julian day numbers: MyDates = TIMEGEN(366, START=JULDAY(1,1,2000)) You can create you own function to convert axis labels to dates: function xtick_time_labels, axis, index, value, level caldat, value, month, day, year year_day = Convert2YearDay(month, day, year) tick = strtrim(year_day, 2) + '-' + strtrim(year, 2) return, tick end then use the XTICKFORMAT keyword in the plot command. plot, MyDates, MyData, XTICKFORMAT='xtick_time_labels' http://exelisvis.com/docs/graphkeyw.html#graphkeyw_328877816 6_370350
creator: Matthew Argall
date: 2014-08-28T00:19:03-00:00