Re: Map_grid options [message #41250] |
Tue, 05 October 2004 04:18 |
jcesq
Messages: 9 Registered: October 2004
|
Junior Member |
|
|
OK! I'll try that!!
Thanks,
J.
Kenneth Bowman <k-bowman@null.tamu.edu> wrote in message news:<k-bowman-7D66EA.14275504102004@news.tamu.edu>...
> 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
|
|
|
Re: Map_grid options [message #41262 is a reply to message #41250] |
Mon, 04 October 2004 12:27  |
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
|
|
|
Re: Map_grid options [message #41264 is a reply to message #41262] |
Mon, 04 October 2004 10:50  |
jcesq
Messages: 9 Registered: October 2004
|
Junior Member |
|
|
I have almost a thousand compositions to be done. I need some
automactical procedure using map_grid and box_axes, or anything
simlilar :-I
Any suggsetions welcome
Jeferson
"Kenneth P. Bowman" <kpb@null.com> wrote in message news:<kpb-C357FF.19154003102004@news.tamu.edu>...
> In article <dcb38451.0410031406.3afdd995@posting.google.com>,
> jcesq@terra.com.br (Jeferson E.) wrote:
>
>> I'm using /box_axes option in the map_grid procedure to draw axes
>> around my images. However, the text labels (lats and longs) are too
>> near to the axes. How can I move alway these labels ?? The IDL's guide
>> doesn't show any option to do that.
>
> My advice is to just accept that IDL does almost-publication-quality
> graphics. ;-)
>
> Open the Postscript file in Illustrator and fix all the things you don't
> like.
>
> Ken Bowman
|
|
|
Re: Map_grid options [message #41274 is a reply to message #41264] |
Sun, 03 October 2004 17:15  |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article <dcb38451.0410031406.3afdd995@posting.google.com>,
jcesq@terra.com.br (Jeferson E.) wrote:
> I'm using /box_axes option in the map_grid procedure to draw axes
> around my images. However, the text labels (lats and longs) are too
> near to the axes. How can I move alway these labels ?? The IDL's guide
> doesn't show any option to do that.
My advice is to just accept that IDL does almost-publication-quality
graphics. ;-)
Open the Postscript file in Illustrator and fix all the things you don't
like.
Ken Bowman
|
|
|