Create a cross section in Surfer

You can use Surfer to create a cross-section by either adding a Profile or by using the Grid Slice command. Method 1 is recommended in most cases but some users, especially those with older versions of Surfer, may find Method 2 offers more control over the end results.

Method 1: Use the Profile tool to create a cross section using a manually drawn trace line or a previously imported base map polyline that defines the trace. The polyline can be drawn on the map as part of a base layer, or it can be in a vector file format (e.g. BLN, BNA, SHP, DXF, etc.). 

  1. Select your multi-layer map.
  2. If you need to draw the profile line:
    1. Click Map Tools | Add to Map | Profile.
    2. Click on the map where you want the cross section line to start. Double click where you want the cross section line to end (you can also click along the line of section to include points in between the start and end points). As soon as you double click to end the section line, the profile object is created and placed below the map, and a base layer is added to your existing map containing the cross section line you just drew. If the map contained multiple layers from different grids, each grid is sliced and added automatically to the profile. You can turn off layers in the profile properties, if desired.
  3. OR, if the profile line is already drawn in a Base layer.
    1. Right click the Polyline in the Contents window and select Add Profile.
  4. Select the Profile object in the Contents window. Choose the appropriate surface from the Current profile dropdown list in the Properties window, and then edit the line and fill properties for that surface.
  5. If you wish to edit the location of the Profile line, you can use the Reshape command (Features | Edit Features | Reshape) on the drawn line in the base layer or you can edit the coordinates of each vertex in the Coordinates tab of the Properties window.

Cross section created with the profile tool in Surfer


Method 2: Use the Grid Slice command. This option extracts a slice through the grid along the trace defined by a polyline. The polyline can be drawn on the map as part of a base layer, or it can be in a vector file format (e.g. BLN, BNA, SHP, DXF, etc.). 

If you have the XY values for the section line, an easy vector format to create is the BLN format. It is an ASCII format consisting of a header line with the number of vertices, followed by the XY coordinates of the vertices. Additional information about creating a BLN file can be found in the article Create a NoData Polygon or BLN file in Surfer.

To create the cross section:

  1. Click Grids | Calculate | Slice.
  2. In the Grid Slice dialog:
    1. In the Input Grid section, either select a grid-based layer created from your grid file, or click the Browse button to navigate to and select the grid file.
    2. In the Slice Line section, either select a base layer created from your vector file or the base layer with the drawn line on it, or click the Browse button to navigate to and select the vector file.
    3. The Output BLN field will be checked by default and is the appropriate file type. Change the file name and/or click the Change Filename button to change the save location. 
      • If you would also like a DAT file, check the box next to Output DAT. The DAT file differs from the BLN in that it will export the coordinates as well as Z values, where the BLN just exports the distance value and the Z coordinate necessary to create the cross section. 
      • If you wish, you can choose to set values outside of the grid to a specified value, and also to remap NoData values to a different value.
    4. Click OK to generate the BLN file.
  3. Back in the plot window, click Home | New Map | Base | Base.
  4. In the Import dialog, select the newly saved BLN file and click Open.
  5. The map is created with proportional scaling. If you would like to increase the vertical exaggeration,
  6. Select the Base layer in the Contents window.
    1. Select Map in the Contents window.
    2. In the Properties window, on the Scale page, uncheck Proportional XY scaling.
    3. If you see a Surfer Warning telling you the width or height will be less than 0.25 inches, click OK to continue.
    4. In the X Scale and/or Y Scale section, enter the desired Length in page units. For example, enter 6 inches for the X Scale Length and 1.5 for the Y Scale Length to match the default scaling of a profile.
  7. On the General page in the Properties window, change the Color in the Line properties section.
  8. Repeat steps 1-8 for any other grid files you want to be part of your profile line, but click Home | Add to Map | Layer | Base during step 8 rather than Home | New Map | Base | Base, so each new section is added to the existing profile rather than added to a new profile.

Cross section created with the Grid Slice tool in Surfer


For different fill colors and patterns, you can convert the polylines in each Base layer to a polygon and fill the polygon. To do this:

  1. In the Contents window, expand then select the Base layer.
  2. Click Features | Group | Start Editing (not necessary in Surfer 18 and newer versions). 
  3. Select the Polyline within the Base layer.
  4. Click Features | Edit Features | Reshape.
  5. Select the farthest node to the right, hold the CTRL key down and click below the bottom axis and to the right of the right axis.
  6. Select the farthest node to the left, hold the CTRL key down and click below the bottom axis and to the left of the left axis. 
  7. Press ESC to exit reshape mode.
  8. Click Features | Change Type | Change Type | Polyline to Polygon. Now the surface is a polygon which can be filled.
  9. Click Features | Group | Stop Editing to exit editing mode (not necessary in Surfer 18 and newer versions).
  10. With the polygon selected, on the Fill page in the Properties window, change the fill properties as desired.
  11. Repeat steps 1-10 for any other Base layers.
  12. If necessary, click and drag the base layers in the Contents window so the layer with the shortest elevation is at the top of the list of layers in the Contents window, and the layer with the tallest elevation is at the bottom of the list.
Cross section created in Surfer using pre-set fill patterns

Another option is to create the slice DAT files in Surfer, and create the cross-sections in Grapher using the DAT files. Grapher has the ability to add fill between curves, simplifying the process of displaying the data.

See also: How can I create a BLN file


Updated 11/19/2021

Was this article helpful?
17 out of 27 found this helpful



Please sign in to leave a comment.