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

Home » Public Forums » archive » Box Axes with Map Function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Box Axes with Map Function [message #82209] Sun, 02 December 2012 08:53 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I *finally* discovered a way to create box axes with
the function graphics Map function that are labeled
in the way we expect box axes to be labeled. There
are two keys.

First, make sure you use a LIMIT keyword on your
map projection and make sure the LATITUDE limits
do not touch -90 or 90 degrees. Without this, you
will get extraneous labels on your map.

Second, use two map projections so you can label
the axes appropriately.

Here is the code.

mp1 = map('Equirectangular', CENTER_LONGITUDE=180, $
POSITION=[0.1,0.1,0.90,0.75], $
LABEL_POSITION = 0, BOX_AXES=1, $
GRID_LATITUDE = 30, GRID_LONGITUDE = 45, $
/CURRENT, ASPECT_RATIO=0, LIMIT=[-89.99, 0, 89.99, 360])
mp1['Latitudes'].label_angle=90
mp1['Longitudes'].label_angle=0

; A second map projection is required to create the
; box axes correctly.
mp2 = map('Equirectangular', CENTER_LONGITUDE=180, $
POSITION=[0.1,0.1,0.90,0.75], $
LABEL_POSITION = 1, BOX_AXES=1, $
GRID_LATITUDE = 30, GRID_LONGITUDE = 45, $
/CURRENT, ASPECT_RATIO=0, LIMIT=[-89.99, 0, 89.99, 360])
mp2['Latitudes'].label_angle=270
mp2['Longitudes'].label_angle=0

; Something to see on the map.
c = MapContinents(Color=cgColor('tomato', /Triple, /Row))

I believe this requires IDL 8.2.1 to work correctly, although
I am not certain of this.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: x-axis label in plot procedure
Next Topic: Re: IDL consultant available for work (more than usual!)

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

Current Time: Wed Oct 08 19:13:46 PDT 2025

Total time taken to generate the page: 0.00700 seconds