|
Getting Started with IDL: Surfaces and Contours |
|
Contour data can be visualized and manipulated at the IDL Command Line. First, we need to create a two-dimensional dataset which we will then visualize. See Accessing Binary Surface Data for instructions to open this data set. Once you have read the file into IDL, you are ready to move on to visualizing the data set three-dimensionally
Another way to view a two-dimensional array is as a contour plot. A simple contour plot of the Data can be created.
MARBELLS=MARBELLS_BINARY.MARBELLS
CONTOUR, MARBELLS
That command was very simple, but the resulting plot was not as informative as it could be.
CONTOUR,MARBELLS,NLEVELS=8,C_LABELS=[0,1]
By using the NLEVELS keyword, CONTOUR was told to plot eight equally-spaced elevation levels. The C_LABELS keyword specifies which contour levels should be labeled. By default, every other contour is labeled. C_LABELS allows you to override this default and explicitly specify the levels to label.
CONTOUR,MARBELLS,NLEVELS=8,/FILL
![]() |
You can add tickmarks that indicate the slope of the contours (the tickmarks point in the downhill direction) by setting the DOWNHILL keyword:
CONTOUR,A,NLEVELS=8,/OVERPLOT,/DOWNHILL
![]() |
First, set up the default 3-D viewing angle by entering:
SURFR
IDL Online Help (March 06, 2007)