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 #19770 is a reply to message #19698] Thu, 13 April 2000 00:00 Go to previous messageGo to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Rachel Howe <rhowe@noao.edu> wrote in message
news:38F673F6.7A8BA656@noao.edu...
> "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?

!D actually shifts down to the first subscript level.

All you need to do is put the !C immediately before or after the title
string in question, to shift the title down or up relative to the default
position.

Cheers,
Liam.
[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: Sat Oct 11 12:16:59 PDT 2025

Total time taken to generate the page: 1.75848 seconds