Wasmer Consulting Scientific and Engineering Software

Previous  Home  Site Map  Contact  Next

Wasmer Consulting - NMPlot - User's Guide - Contour Plots


NMPlot User's Guide, Chapter 9: Contour Plots

Contours are a powerful tool for visualizing a grid. Using NMPlot, you can easily create publication-quality contour plots.

Primary and Secondary Contours

Consider the following contour plot.

Note that this plot has two different styles of contour lines. One is thick, black, and labeled with the contour level. The other is thin, gray, and not labeled.

Typically, contour plots are drawn using two styles of contours. Primary contours are bolder and often labeled. Secondary contours are subtler. There are usually several secondary contours between every adjacent pair of primaries. This reduces clutter, and results in a plot that is both informative and readable.

However, there are situations where additional contour styles are required. An example is a plot in which each contour is filled with a different color.

Tip:

Use additional contour styles to highlight contour levels of specific interest. The following example plot uses conventional primary and secondary contours to show the terrain elevation near a river. The river's flood plain is highlighted by an additional red-filled contour.

Displaying Contours

To display contours on a plot, follow these steps.

  1. Go to the Contours page of the Plot Options dialog box.

  2. Check the box labeled Show Contours.

  3. Visit the other contour pages of the Plot Options dialog box, and set the options as desired.

Contour Levels

To set the levels at which contours are drawn, follow these steps.

  1. Go to the Levels page of the Plot Options dialog box.

  2. Select how you would like to specify the contour levels.

    • Automatically calculate contour levels - NMPlot inspects the data values in your grid, and automatically chooses an appropriate set of contour levels.

      1. Type the approximate number of primary contours that will be drawn. In order to select an aesthetically pleasing set of levels, NMPlot may choose to display a slightly different number of primary contours.

      2. Type the number of secondary contours that will be drawn between every adjacent pair of primary contours. Type zero to turn off the display of secondary contours.

      The primary and secondary contours will be drawn using the Primary Contours and Secondary Contours styles, respectively. See Contour Styles for more information.

    • Manually specify contour levels - NMPlot calculates the contour levels based on a set of conditions that you specify.

      1. Type the levels of the highest and lowest primary contours.

      2. Type the spacing between primary levels: i.e., the difference in levels between adjacent primary contours. For example, if you specify 50, 90, and 10 for the lowest level, highest level, and spacing, respectively, NMPlot will draw primary contours at the following levels: 50, 60, 70, 80, and 90.

      3. Type the number of secondary contours that will be drawn between every adjacent pair of primary contours. Type zero to turn off the display of secondary contours.

      The primary and secondary contours will be drawn using the Primary Contours and Secondary Contours styles, respectively. See Contour Styles for more information.

    • Manually specify each contour level - You explicitly specify the level and style of every contour.

      Enter one or more levels, and select the contour style associated with each. Press the Add Row button to add another row to the table. Press the Remove Row button to remove a row.

      To associated more than one contour level with a particular style, type a list of levels, separated by commas. For example, "10, 20, 30".

      You can specify the levels in any order.

Contour Styles

NMPlot gives you full control over the styles (color, thickness, labeling, etc.) of your contours. The set the styles, follow these steps.

  1. Go to the Styles page of the Plot Options dialog box.

  2. Contour styles are displayed using a standard spreadsheet control, which functions much like a spreadsheet such as Microsoft Excel. See Spreadsheet Control for more information on using spreadsheet controls.

    Press the Add Row button to add a style. Press the Remove Row button to remove the style that contains the selected cell.

    Press the Move Row Up and Move Row Down buttons to change the order in which styles are listed. The order is irrelevant to NMPlot, but you may wish to list styles in a logical order for organizational purposes.

    Note:

    Two styles, named Primary Contours and Secondary Contours, cannot be deleted. These styles are used for the primary and secondary contours. See Contour Levels for more information.

  3. In the Style Name column, type a unique, descriptive name for each of your styles.

    Note:

    You cannot change the names of the Primary Contours and Secondary Contours styles.

  4. In the Draw Line column, check the box to draw the contour lines. Either this box or the Fill Contour box should be checked: otherwise, the contours will not be visible.

  5. In the Line Color column, select the color of the lines used to draw your contours. See Color Control for information on selecting colors.

  6. In the Line Width column, type the width, in millimeters, of the lines used to draw your contours. Typically, widths are between 0.2 to 1.0 millimeters.

  7. In the Line Pattern column, select the dash pattern (dashed, dotted, solid, etc.) of the lines used to draw your contours. See Line Pattern Control for information on selecting line patterns.

  8. In the Label column, type the text used to label your contours. If you do not want the contours labeled, delete the label text.

    See Contour Label Locations for information on setting the locations where contours are labeled.

    The label can include symbolic fields, placeholders for text that is automatically inserted when the label is displayed. For example, the field {Level} is automatically replaced with the contour level.

    Press the Insert Symbolic Field button , located to the right of the text box, to display a list of fields from which you can choose.

    Some of the fields commonly used in contour labels are:

    Field Description
    {Level}   Level of the contour being drawn
    {Metric}   Metric of the grid being plotted: i.e., what is being measured by the grid
    {Units}   Physical units of the grid being plotted

    See Symbolic Fields Text Control for more information about symbolic fields.

  9. In the Label Font column, select the font used to draw contour labels. See Font Control for information on selecting fonts.

  10. In the Fill Contour column, check the box to fill contours with a solid color. Either this box or the Draw Line box should be checked: otherwise, the contours will not be visible.

  11. In the Fill Color column, select the color used to fill your contours. See Color Control for information on selecting colors.

  12. In the Fill Opacity column, type the percent opacity of the fill color. The opacity may range from 0% (totally transparent) to 100% (totally opaque). An intermediate opacity will tint the contour areas with a translucent color that allows a background map to show through.

  13. NMPlot allows you to export a plot to a Geographic Information System (GIS) in a number of common formats. Some GIS formats support the concept of named layers. In the Contour Lines Layer Name and Contour Labels Layer Name columns, type the names of the layers that contour lines and contour labels are exported in. To export to the default unnamed layer, delete the layer name.

Smoothing Contours

If the distance between data points in a grid is relatively large, then a contour plot of the grid may contain sharp angles. NMPlot allows you to improve the appearance of these contours by smoothing them.

To smooth contours, follow these steps.

  1. Go to the Smoothing page of the Plot Options dialog box.

  2. Select the Smooth Contours radio button.

  3. Tension: Type the smoothing tension. NMPlot uses a smoothing method called Splines Under Tension. Intuitively, you can imagine a contour as a rubber band. Without tension, the rubber band curves smoothly. When pulled tight, the rubber band becomes straight.

    You can set the tension to any value between 0.1 and 100. A tension of 1 or 2 will produce nicely smoothed contours. Smaller values will make the contours more rounded. Larger values will decrease the smoothing effect. Large tensions, above about 50, effectively disable smoothing.

  4. Maximum angle: When NMPlot draws smoothed contours, what appears to be a continuous curve is actually drawn as a large number of tiny straight line segments. Type the maximum angle, in degrees, that is allowed between adjacent segments.

    Decreasing the angle makes the contours appear smoother, but also increases the time required to draw them. A value of 3 degrees is a reasonable compromise: it usually results in contours that appear smooth to the naked eye.

    The Maximum Angle has the greatest effect on broadly curving contours.

  5. Minimum segment length: When NMPlot draws smoothed contours, what appears to be a continuous curve is actually drawn as a large number of tiny straight line segments. Type the minimum allowed length, in millimeters, of a line segment.

    Decreasing this length makes the contours appear smoother, but also increases the time required to draw them. A value of 1 millimeter is a reasonable compromise: it usually results in contours that appear smooth to the naked eye.

    The Minimum Segment Length has the greatest effect on sharply curving contours.

Caution:

Use care when smoothing contours. While it does improve the appearance of a plot, smoothing can give the impression that your grid has a finer resolution than it actually does. Unsmoothed contours will not mislead you about the accuracy of your data.

Contour Label Locations

Use the Contour Label Locations page of the Plot Options dialog box to control where contour lines are labeled.

Select the Do not label contours radio button to turn off contour labeling.

Select the Position contour labels automatically radio button to turn on contour labeling. Type the distance, in centimeters, between adjacent labels along each contour line.

See Contour Styles for information on setting the text used to label contours.

Contour Clipping

Use the Contour Clipping page of the Plot Options dialog box to control how contours are displayed if they reach the edge of the grid.

Select Close contour by extending it along the edge of the grid if you want your contour lines to always appear as closed polygons. If a contour reaches the edge of the grid, it will follow the edge until it reaches the location where the contour reenters the grid.

Select Clip contour at the edge of the grid to stop contour lines at the edge of the grid. In this case, the contours will form isolated line segments instead of closed polygons.

Note:

A grid's edge is defined by its defined area polygon: see Defined Area Polygon.

Contour Topology

Use the Contour Topology page of the Plot Options dialog box to control the topology of the polygons that represent contours.

Select Overlapping polygons to generate contour polygons with overlapping areas. For example, if you draw contours with levels of 10 and 20, the contour polygon representing level 10 will enclose all points with a grid value above 10.

Select Adjacent nested rings to generate contour polygons with adjacent, non-overlapping areas. For example, if you draw contours with levels of 10 and 20, the contour polygon representing level 10 will enclose all points with a grid value above 10 and below 20.

Tip:

Unless you have special needs, it is recommended that you select Overlapping polygons.

Displaying Contour Areas

To display the area inside each contour on a plot, choose Display Contour Areas from the Plot menu. The Contour Areas dialog box appears.

You are warned if any contours are not completely enclosed by your grid's defined area polygon. In this case, the displayed contour area is too low, since the area calculation does not include the portion of the contour beyond the edge of your grid.

You can change the units used to display the areas. See Physical Units.

The current contour topology controls the meaning of a contour's area. See Contour Topology. If the topology is set to Overlapping polygons, then a contour's area includes all points where the grid value is greater than the contour's level. If the topology is set to Adjacent nested rings, then a contour's area includes all points where the grid value is greater than the contour's level but less than the next higher contour's level.


Previous  Home  Site Map  Contact  Next

Copyright © 1996-2008, Wasmer Consulting
Page URL: http://wasmerconsulting.com/nmplot_usersguide_contourplots.htm
Webmaster e-mail: wasmer@wasmerconsulting.com