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

Home » Public Forums » archive » Re: plot, xtickname
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, xtickname [message #13139 is a reply to message #13131] Tue, 20 October 1998 00:00 Go to previous message
harald is currently offline  harald
Messages: 5
Registered: October 1998
Junior Member
On Mon, 19 Oct 1998 17:34:51 GMT, campo9729@my-dejanews.com wrote:

> i am doing a tv command and then a plot command to create axes around
> the image. i would like to use the plot command and exactly specify
> the x axis tick names that i want. here is my array of xaxis names in
> this order:
>
> xaxis=[0,2,4,6,20,33,40,6,9,15,25,35]
> xaxis=string(xaxis)
>
> but i am unsure which keywords to use.
> (in my case my xaxis array will be much longer, but i don't
> even know how to do this example case.)

You could use the XTICKFORMAT keyword together with the XTICKS and
XMINOR keywords (see IDL documentation).

Try the following:

;----------------------------------------------------------- ------------------------
FUNCTION Get_Label, axis, index, value

xaxis=STRING([0,2,4,6,20,33,40,6,9,15,25,35])
RETURN, xaxis[index]

END

WINDOW, XSIZE=400, YSIZE=400
image = DIST(300)
TVSCL, image, 50, 50
PLOT, [0], XTICKS=11, XMINOR=1, XTICKFORMAT='Get_Label', $
YTICKS=1, YMINOR=1, YTICKFORMAT='(A1)', $
POSITION=[50,50,349,349], /NOERASE, /DEVICE
END
;----------------------------------------------------------- -----------------------

The keyword YTICKFORMAT='(A1)' suppresses the y-axis annotation.

Regards,
Harald

------------------------------------
Harald Jan Jeszenszky
harald@iwf.tu-graz.ac.at

Space Research Institute
Austrian Academy of Sciences
------------------------------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Problems with object graphics under Linux
Next Topic: adjustimg brightness of an image

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

Current Time: Fri Oct 10 17:49:44 PDT 2025

Total time taken to generate the page: 0.39976 seconds