Re: Drawing map in 3D plot [message #39914] |
Fri, 25 June 2004 13:45 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Kenneth Bowman writes:
> Of course, I thought about NOCLIP, but couldn't see why it would be
> clipping continents but not other things. I should have tried the
> experimental computer science approach (i.e., try it and see if it
> works).
I think it must be a round-off problem once the lat/lon
coordinates are rotated. But it has been doing it for
as long as there have been MAP_CONTINENTS. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: Drawing map in 3D plot [message #39917 is a reply to message #39914] |
Fri, 25 June 2004 13:30  |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
In article <MPG.1b46304fbde8a8949897b6@news.frii.com>,
David Fanning <davidf@dfanning.com> wrote:
> Continents get clipped for some reason in 3D. Unfortunately,
> the MAP_SET command doesn't pass the NOCLIP along to MAP_CONTINENTS,
> so you have to call the latter command by itself.
Thanks David,
Of course, I thought about NOCLIP, but couldn't see why it would be
clipping continents but not other things. I should have tried the
experimental computer science approach (i.e., try it and see if it
works).
Ken
"A foolish belief in the the consistency of IDL is the hobgoblin of
little minds, adored by statemen and philosophers and journeyman IDL
programmers." (with apologies to Ralph Waldo Emerson)
|
|
|
Re: Drawing map in 3D plot [message #39921 is a reply to message #39917] |
Fri, 25 June 2004 12:52  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Kenneth Bowman writes:
> Any idea why the Antarctic coastline is cut off? The gap appears to be
> related to the aspect ratio of the window. Try changing the shape of
> the window (either tall or wide) and rerun the commands above.
> Apparently, coastlines are not drawn close the bottom of the window.
>
> This is in a new IDL session. I have not set any margins, etc. It
> happens with both the X and PS devices.
>
> Any idea how to fix this?
I fixed it like this:
x = -180.0 + 360.0*RANDOMU(seed, 100) ;Make some random data
y = -90.0 + 180.0*RANDOMU(seed, 100)
z = 1000.0*RANDOMU(seed, 100)
PLOT_3DBOX, x, y, z, $
PSYM = 3, $
XTITLE = 'Longitude', $
XSTYLE = 1, $
XRANGE = [-180.0, 180.0], $
XTICKS = 4, $
XMINOR = 3, $
YTITLE = 'Latitude', $
YSTYLE = 1, $
YRANGE = [-90.0, 90.0], $
YTICKS = 6, $
YMINOR = 3, $
ZTITLE = 'Altitude (hPa)', $
ZSTYLE = 1, $
ZRANGE = [1000.0, 0.0], $
ZTICKS = 5, $
ZMINOR = 2
MAP_SET, /T3D, /CONT, Z = 1000.0, /NOERASE, $
LIMIT = [-90.0, -180.0, 90.0, 180.0], /NOBORDER, $
POSITION = [!X.WINDOW[0], !Y.WINDOW[0], !X.WINDOW[1], !Y.WINDOW[1]]
MAP_CONTINENTS, Z=1000.0, /T3D, /NOCLIP
Continents get clipped for some reason in 3D. Unfortunately,
the MAP_SET command doesn't pass the NOCLIP along to MAP_CONTINENTS,
so you have to call the latter command by itself.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|