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

Home » Public Forums » archive » Controlling axis labels in IDL plots?
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: Controlling axis labels in IDL plots? [message #19772 is a reply to message #19698] Thu, 13 April 2000 00:00 Go to previous messageGo to previous message
Rachel Howe is currently offline  Rachel Howe
Messages: 6
Registered: May 1996
Junior Member
"Liam E.Gumley" wrote:
>
> Rachel Howe wrote:
>>
[Snip]
>> Does anyone know how the distance of the axis label from the axis is
>> determined in a single-panel 2d plot?
>
[Snip]
>> Or would it be easier to give up and just use
>> XYOUTS to put the annotations where I want them?
>
> Here's a quick and dirty method which can be used to push the X and Y
> axis labels further away from the axes using the !C (carriage return)
> font positioning code:
>
> ;- Set a reasonable character size and create data
> device, set_character_size=[10, 12]
> x = findgen(200) * 0.1
> y = sin(x)
>
> ;- Default axis label positions
> plot, x, y, xtitle='X AXIS', ytitle='Y AXIS'
>
> ;- Move X axis label down one character
> IDL> plot, x, y, xtitle='!CX AXIS', ytitle='Y AXIS'
>
> ;- Move Y axis lable left one character
> IDL> plot, x, y, xtitle='X AXIS', ytitle='Y AXIS!C'
>
> I find this particularly useful when adding titles to maps which have a
> box grid:
>
> window, /free
> map_set, -30, 130, scale=40e6, $
> xmargin=[2, 2], ymargin=[2, 4], title='MAP TITLE!C'
> map_continents
> map_grid, /box, charsize=0.75
>
> Unless you add the trailing !C to the title, it is displayed at the same
> height as the top row of longitude labels. If this method doesn't suit
> your needs, I think you will have to resort to manually positioned
> labels.
>


And presumably one could go the other way using !D?


Thanks for the suggestion!

--
Rachel Howe
National Solar Observatory, Tucson
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Font size appearance in function graphics PNG and EPS output
Next Topic: Full page plot in postcript

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

Current Time: Sun Oct 12 11:56:50 PDT 2025

Total time taken to generate the page: 2.07950 seconds