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 #13131 is a reply to message #13130] Tue, 20 October 1998 00:00 Go to previous messageGo to previous message
campo9729 is currently offline  campo9729
Messages: 2
Registered: October 1998
Junior Member
Harald,

Your suggestion assumes that I know ahead of time what my xaxis labels will
be. I do not know this. Get_Label.pro is not a general routine. I've tried
creating an x or y array with the values that I want and using nodata=1,
but this creates no labels at all. This is very frustrating. I would
appreciate any further help.
Regards,
Cathy


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
> ------------------------------------
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
[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: Sat Oct 11 00:24:49 PDT 2025

Total time taken to generate the page: 2.86520 seconds