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

Home » Public Forums » archive » Re: Map_grid options
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: Map_grid options [message #41262 is a reply to message #41250] Mon, 04 October 2004 12:27 Go to previous messageGo to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <dcb38451.0410040950.70d92a62@posting.google.com>,
jcesq@terra.com.br (Jeferson E.) wrote:

> I have almost a thousand compositions to be done. I need some
> automactical procedure using map_grid and box_axes, or anything
> simlilar :-I

Ah, in that case, don't use BOX_AXES. Also, don't use the automatic
labels in MAP_GRID. Draw the labels yourself with XYOUTS. (I also find
that for cylindrical equidistant projections I need to draw the
parallels and meridians myself (i.e., don't call MAP_GRID).)

Unfortunately, you have to set things up specifically for each map
projection that you use.

Something like this should get you started (dx and dy are fudge factors
to get the label alignment right). This example is for a cylindrical
equidistant global map.

Ken Bowman


PRO MAP_TEST1

title = 'Map Test 1'

!P.POSITION = [0.1, 0.1, 0.9, 0.9]
MAP_SET, 0, 0, /CYLINDRICAL, LIMIT = [-90, -180, 90, 180], /NOBORDER
MAP_CONTINENTS

ch_size = CONVERT_COORD(!D.X_CH_SIZE, !D.Y_CH_SIZE, /DEVICE, /TO_NORMAL)
dx = ch_size(0)
dy = ch_size(1)

xy = CONVERT_COORD(0.0, 90.0, /DATA, /TO_NORMAL)
XYOUTS, xy(0), xy(1)+1.5*dy, title, /NORMAL, ALIGNMENT = 0.5

xy0 = CONVERT_COORD(-180.0, -90.0, /DATA, /TO_NORMAL)
xy1 = CONVERT_COORD( 180.0, 90.0, /DATA, /TO_NORMAL)

FOR xx = -180, 180, 90 DO BEGIN
xy = CONVERT_COORD(FLOAT(xx), -90.0, /DATA, /TO_NORMAL)
PLOTS, [xy[0], xy[0]], [xy0[1], xy1[1]], PSYM = -3, /NORMAL
xlabel = STRTRIM(STRING(xx), 2)
XYOUTS, xy(0), xy(1)-2.0*dy, xlabel, /NORMAL, ALIGNMENT = 0.5
ENDFOR

FOR yy = -90, 90, 30 DO BEGIN
xy = CONVERT_COORD(-180.0, FLOAT(yy), /DATA, /TO_NORMAL)
PLOTS, [xy0[0], xy1[0]], [xy[1], xy[1]], PSYM = -3, /NORMAL
ylabel = STRTRIM(STRING(yy), 2)
XYOUTS, xy(0)-dx, xy(1)-dy/2.0, ylabel, /NORMAL, ALIGNMENT = 1.0
ENDFOR

END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Object Graphics with multi-page output?
Next Topic: Re: Arrays with NaN values

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

Current Time: Mon Dec 01 05:56:12 PST 2025

Total time taken to generate the page: 1.75919 seconds