jkeller writes:
> However, I'm still quite annoyed with the fact that for a non-
> rectangular projection (e.g. mollweide, stereographic) MAP_GRID
> produces grid lines only for a segment of the latitude ring and misses
> the upper and/or lower edges of the map plot. But if you use /BOX_AXES
> in the same plot, it borders the full rectangular map extent (which is
> "correct" as IDL plots the map for the rectangular area instead of the
> segment limits). Any ideas for this problem?
Humm. I guess I don't see this as a "problem". It
is pretty much exactly what I would expect to happen
when you set the LIMIT as you have to in order to get
this output.
Maybe I'm missing something. Does other software handle
this differently?
In any case, here is one way to fix your specify problem.
I just draw the map in a larger position in another window
(could be a pixmap window), then copy the contents over
to the first window. This results in grid lines going
to the edge of the box plot.
;*********************************************************
window, xsize=500, ysize=500
m = obj_new('mapcoord', 110, center_lon=-115, center_lat=43, $
limit=[36, -130, 50, -100])
c = obj_new('map_outline', /USA, color='grey', map_object=m)
g = obj_new('map_grid', /auto, map_object=m, color='grey', box_axes=1)
m -> setproperty, outline=c, grid=g, position=[0.1, 0.1, 0.9, 0.9]
m -> draw, /overlay
window, xsize=500, ysize=500, 1;, /pixmap
g -> setproperty, box_axes=0
m -> setproperty, position=[0.025, 0.025, 0.975, 0.975]
m -> draw, /overlay
wset, 0
device, copy=[50, 50, 400, 400, 50, 50, 1]
END
;*********************************************************
Of course, I am using the map projection objects from
my Coyote and Catalyst Libraries, but you can do the
same with the built-in IDL routines.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|