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

Home » Public Forums » archive » Changing the labels orientation
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: Changing the labels orientation [message #54281 is a reply to message #54202] Tue, 29 May 2007 10:40 Go to previous messageGo to previous message
jujo is currently offline  jujo
Messages: 8
Registered: May 2007
Junior Member
On 29 maio, 05:11, Tim <timrobis...@gmail.com> wrote:
> Hi there Hervé,
>
> Here's how you could do it in an almost general fashion:
>
> x = findgen(100)*1d19
> y = sqrt(x)
> charsize=2.0
> ; PLOT THE DATA, DON'T LABEL THE X AXIS AND RETURN THE XTICK VALUES...
> plot, x, y, XTICKFORMAT='(A1)', XTICK_GET=xticks, YMARGIN=[9,2], $
> CHARSIZE=charsize
> ; CONVERT THE XTICK VALUES TO NORMALIZED POSITION...
> xtickpos = !x.s[0] + !x.s[1]*xticks
> ; GET THE CHARACTER HEIGHT AND WIDTH IN NORMALIZED COORDINATES...
> y_ch_size = charsize * float(!d.y_ch_size) / !d.y_vsize
> x_ch_size = charsize * float(!d.x_ch_size) / !d.x_vsize
> ; PUT THE LABELS AT THE APPROPRIATE TICK POSITIONS...
> xyouts, xtickpos+0.5*x_ch_size, !y.window[0]-0.5*y_ch_size, /NORM,
> xticks, $
> ALIGN=1.0, ORIENTATION=90.0, CHARSIZE=charsize
>
> It sounds like in your case you already have the value of xticks and
> rather than retrieving xticks via XTICKS_GET, you'll probably be
> specifying the tick values immediately using XTICKS and XTICKV. You
> can change the ORIENTATION to 45 to save a little more room for the
> plot.
>
> Hope this helps! Best -Tim.


Thanks Tim, the code is fine!!
Best!
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: displaying an image in simple geographic coordinates
Next Topic: Using .sav files outside of IDL

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

Current Time: Wed Oct 08 20:35:57 PDT 2025

Total time taken to generate the page: 1.28091 seconds