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

Home » Public Forums » archive » How to label a time axes on an image?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
How to label a time axes on an image? [message #93219] Mon, 16 May 2016 04:26 Go to previous message
steven.abel is currently offline  steven.abel
Messages: 13
Registered: April 2016
Junior Member
Hi

I am having trouble labeling a time axis on an image. Here is some test code

;create a randomn image for testing
data = RANDOMU(seed,1800,401)
img = BYTSCL(data)

;data values that I would like to use for labeling the axes
xval = FINDGEN(1800)/(60.*60.*24.) + JULDAY(11,24,2014,11,15,00)
yval = FINDGEN(401)-200.

;plot the image and label the axes
im = IMAGE(img, RGB_TABLE=0,MARGIN=0.2)
yax = AXIS('Y', LOCATION=[0,0], TICKDIR=1, MINOR=0, COORD_TRANSFORM=[yval[0],1])
xax = AXIS('X', LOCATION=[0,0], TICKDIR=1, MINOR=0, TICKFORMAT='(C(CHI2.2, ":", CMI2.2))', COORD_TRANSFORM=[xval[0],1.])

I am using COORD_TRANSFORM in the call to AXIS to try and convert the pixel number of the image to what I would like to display. In the example above this works for the yaxis which simply changes the axis data values. For the xaxis I am also trying to display it in a time format as HH:MM but all of the axes labels display as 00:00.

Any idea how I can label the xaxis correctly?

Thanks

Steve
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: plot data
Next Topic: Convert Function to Procedure

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

Current Time: Wed Oct 08 09:09:00 PDT 2025

Total time taken to generate the page: 0.00352 seconds