Skip to main content

Customize contours in Surfer

Contour lines are drawn on a topographic map to indicate ground elevation or depression. In Surfer, you can add custom contour lines, customize those lines, and indicate NoData areas with contour lines, helping ensure clarity of data in your contour maps.

Add a specific contour line to my contour map in Surfer

Surfer's advanced level method can be used to specify the contour lines that are displayed on a contour map.  To use this method to add a specific contour line, follow the steps below.

  1. In the Contents window, select the Contours layer.
  2. In the Properties window, click the Levels tab.
  3. In the General section, in the Level method field click the drop down and select Advanced.
  4. Right below Level method, in the Contour levels field click the Edit levels button.
  5. In the Levels for Map dialog, click the current level that will follow your desired contour.
  6. Click the Add button. The new contour level will be added directly before the level selected in Step 4.
  7. Double click the new contour level value, enter the desired value in the Z Level dialog, and click OK.
  8. If desired, adjust the Line, Fill, Label, and Hachure properties.
  9. Click OK. The map will now show the newly added contour line.

Adding contour line in the Levels for Map dialog.png

Adding contour line in the Levels for Map dialog.

 

Use gradient to color contour lines

You can use the Advanced Level method to give the contour lines gradational coloring. Please see the steps below. 

  1. In the Contents window, click the Contours layer.
  2. In the Properties window, click the Levels tab.
  3. Set the Level method to Advanced.
  4. Click Edit Levels.
  5. In the Levels for Map dialog:
    1. Click the Line column header.
    2. In the Line dialog, set Properties to Gradational.
    3. Click the colormap next to Color.
    4. In the Colormap Editor dialog, use a Preset, or change the colormap to create the gradient color scale.
    5. Click OK in the Colormap Editor dialog.
    6. Click OK in the Line dialog.
  6. Click OK in the Levels for Map dialog.

Using gradient to color contour lines in the Levels for Map dialog.png

Using gradient to color contour lines in the Levels for Map dialog.

 

Create dashed contour lines in the NoData areas of a contour map in Surfer

To view contours in areas that have NoData values, but have them be displayed with a different line style (dashed, gray, etc) you can separate the data inside and outside a polygon boundary. Then you can apply different line styles to the two layers to differentiate them. To do this follow these steps:
  1. Create a polygon boundary to indicate the NoData area.
    1. To draw a polygon by hand or export a single contour line refer to this article, Create a NoData Polygon or BLN file in Surfer.
    2. To use Surfer to create an alpha share around your data points, see this article Using Alpha Shapes in Surfer.
  2. Create a new layer with data only inside the polygon.
    1. In the Contents window, select the contour layer.
    2. Click Grids | Edit | Assign NoData.
    3. The Assign NoData to Grid window will pop up.
    4. In the Input Grid section select the contour layer with the data you want to separate.
    5. In the NoData Polygon Boundary section select the polygon you created in Step 1.
    6. Select the NoData Outside selection.
    7. In the Output Grid section, click Change Filename button to save the data inside the polygon to a file in the Save Grid As window and click Save.
    8. Check the Add grid as layer to:  checkbox and select Map from the dropdown.
    9. Click OK.
    10. The Surfer window will pop up and tell you the file has been assigned no data, and it's file name and location.
    11. Click OK
      Assign NoData to Grid dialog NoData Outside.png
  3. Create a new layer with data only outside the polygon
    1. In the Contents window, select the contour layer.
    2. Click Grids | Edit | Assign NoData.
    3. The Assign NoData to Grid window will pop up.
    4. In the Input Grid section select the contour layer with the data you want to separate.
    5. In the NoData Polygon Boundary section select the polygon you created in Step 1.
    6. Select the NoData Inside selection.
    7. In the Output Grid section, click Change Filename button to save the data outside the polygon to a file in the Save Grid As window and click Save.
    8. Check the Add grid as layer to:  checkbox and select Map from the dropdown.
    9. Click OK.
    10. The Surfer window will pop up and tell you the file has been assigned no data, and it's file name and location.
    11. Click OK
      Assign NoData to Grid dialog NoData Inside.png
  4. Uncheck the box next to the original contour layer.
  5. If there is too large a gap between the two contour maps, where the boundary polygon line is you can do one of the following. Otherwise skip this step. 
    1. Regrid the original grid file with higher resolution (more grid nodes). Then repeat step 2 and 3 using the newly created map/layer.
    2. Click Grid | Spline Smooth to insert more nodes in the original grid file. Smaller grid cells or more grid nodes will reduce the gap at the blanked edge. Then repeat step 2 and 3 using the newly created map/layer. (The Dashed in Blanked area.srf example attached and the map image below on the right were created with 300 x 300 grid lines.)
      Contour gap between polygon line.png Contour gap between polygon line after Spline smooth.png
  6. Change the line style for the contour maps inside and outside the boundary polygon as desired. 

dashed contours outside the area of interest.jpg dashed contours outside the area of interest color fill.png
Two examples of Surfer contour maps showing dashed contours outside the area of interest.

 

Additional customize contour line resources

For more in-depth information about these topics please click the links below.

 

Updated January 2024.

 

Was this article helpful?
0 out of 2 found this helpful

Comments

0 comments

Please sign in to leave a comment.