Click here to see the SAS code.
Click here to see the example.
This example even amazed me! :)
---
Note: this example uses the interactive sas/graph activex graph control
to allow you to rotate the 3d chart - you must use the Internet Explorer
web browser to use the activex control. If you do not have Internet
Explorer, and would like to just see a static copy of the chart,
click here and here.
---
I went to the NOAA website, and downloaded the elevation data for
latitude (up/down) = 50N-25N, longitude (across)=125W-67W, and elevation,
with a grid/cell size of 1 data point every 10-minutes (this is 'minutes'
as in degrees/minutes/seconds). There are 52,699 obsns in my
topo_10min.dat data file!
This amount of data was a bit overkill, and was basically more data
than I had pixels to represent it with, so I used "proc g3grid"
to reduce/summarize the data. I then use "proc g3d" to plot
the data.
To get the nicely-shaded 3d surface, and also to get the
interactive/dynamic rotate capability, I use "goptions dev=activex".
You can use Right-Mouse-Button -> Graph Toolbar to bring up a
graphic toolbar that will show you several things you can use
to interact with this 3d surface (rotate/move/zoom).
There are also several other 'goodies' and menus under the
Right-Mouse-Button that let you interace with the plot
(I'll let you 'discover' them on your own! :)
Note that to view this example, you must have the activex
graph control installed (which happens when you install sas/graph
on your pc). If you don't have the activex graph ontrol installed,
I have added special code to my ODS statement which will trigger
your IE browser to prompt you to install it automatically
using the sasgraph.exe that is located in this directory.
Here is the special code that does this...
CODEBASE="./sasgraph.exe#version=9,1,3,135"
All maps 'lie' to some extent :) One lie you might notice in this
one is that I treat all 3 axes (x/y/z) as if they are to the same
scale, even though the long/lat degrees on the x & y axes are not
really in the same units as the elevation on the z-axis (therefore
the z-axis elevation is somewhat exaggerated, in comparison to the
x/y axes).
Back to Samples Index