overplotting contours on a map [message #75398] |
Tue, 01 March 2011 11:22  |
barry.baker
Messages: 1 Registered: March 2011
|
Junior Member |
|
|
I just upgraded to idl 8 and was playing around with it. I was trying
to overplot some contours onto a map and when I do this the graphics
window resizes the map itself and doesn't plot the contours. I can do
this the old way using the procedure but I was trying to use the newer
functions. here is the code I have
map = MAP('Cylindrical Equal Area', LIMIT =
[floor(min(lat)),floor(min(lon)),ceil(max(lat)),ceil(max(lon ))])
grid = map.MAPGRID
grid.LABEL_POSITION = 0
grid.LINESTYLE = "dotted"
grid.LABEL_ANGLE= 0
m1 = MAPCONTINENTS(/USA, FILL_COLOR="white", COMBINE=0)
mm = contour(reform(uint[*,*,6,0]),lon,lat,/overplot)
here lon and lat both 2x2 matrices the same size as the first two
elements in uint. any help would be appreciated.
|
|
|
Re: overplotting contours on a map [message #75451 is a reply to message #75398] |
Mon, 07 March 2011 13:43  |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Mar 1, 12:22 pm, "barry.baker" <barry.d.ba...@gmail.com> wrote:
> I just upgraded to idl 8 and was playing around with it. I was trying
> to overplot some contours onto a map and when I do this the graphics
> window resizes the map itself and doesn't plot the contours. I can do
> this the old way using the procedure but I was trying to use the newer
> functions. here is the code I have
>
> map = MAP('Cylindrical Equal Area', LIMIT =
> [floor(min(lat)),floor(min(lon)),ceil(max(lat)),ceil(max(lon ))])
> grid = map.MAPGRID
> grid.LABEL_POSITION = 0
> grid.LINESTYLE = "dotted"
> grid.LABEL_ANGLE= 0
> m1 = MAPCONTINENTS(/USA, FILL_COLOR="white", COMBINE=0)
>
> mm = contour(reform(uint[*,*,6,0]),lon,lat,/overplot)
>
> here lon and lat both 2x2 matrices the same size as the first two
> elements in uint. any help would be appreciated.
Hi Barry,
I think this is really close. You just need to add
GRID_UNITS='degrees' in your CONTOUR() call.
-Chris
ITTVIS
|
|
|