Combining Grapher with Surfer to Display Cross Sections

In Grapher, it is very easy to create a composite graph that includes data from many sources. Such a graph can combine stacked bar charts, line graphs, and scatter plots all on the same sets of axes. Grapher can combine these multiple plots in both 2D graphs and 3D graphs.

One common type of combined 2D graph in the geosciences is a cross section. Surfaces are cut along a particular path to obtain a topological profile. When these profiles are combined on a single set of axes, a cross section is created.

Although cross sections can be made in Surfer (see the accompanying article Creating and Displaying Cross Sections in Surfer 8), Grapher provides many more options for enhancing the appearance of the graph. This can aid in highlighting trends or a particular feature in the cross section.

Obtaining the Data: Getting the information from Surfer

In Surfer, grid files can be produced using numerous gridding methods with the Grid | Data command. After the grid file is created, a section of the data is generated using the Grid | Slice command. This will create a DAT file that contains five columns.

Column DAT File Contents
A X coordinates along the slice
B Y coordinates along the slice
C Z value (elevation) at the X,Y location
D Accumlated distance along the slice
E Boundary number (useful with multiple slices)

Although any of these columns could be used for creating a graph in Grapher, a cross-section would typically use the accumulated distance for the X axis and the elevation or Z value for the Y axis. This would be columns D and C in the DAT file created by Surfer's Grid | Slice command. It's not necessary to alter the original data file, as Grapher lets you choose which columns to use for a graph. If you want to graph sections through multiple grids, you will use the Grid | Slice command multiple times and have several data files.

Constructing the Cross Section

Cross sections can be created, like many other composite graphs, using the Graph | 2D Graphs | Line/Scatter command and selecting the data file. This command creates a default line/scatter plot from the first two columns of data. In this case, the curve created is the actual slice through the surface. In most cases, this is a straight line. After the default curve is created, we can alter the graph to show the columns we want. To do this, follow these directions:

  1. Click once on "Line/Scatter Plot 1" in the Object Manager.
  2. In the Property Inspector, open the Plot Properties section. Change the X column to Column D and the Y column to Column C.
  3. Choose Graph | Add to Graph | Plot to add the second profile to the graph. Choose Line/Scatter Plot and click the OK button. Click the OK button in the Choose Axes dialog to add the curve to the same set of axes. Select the worksheet for the second profile and click the Open button.
  4. In the Property Inspector, open the Plot Properties section. Change the X column to Column D and the Y column to Column C.
  5. Repeat steps 3 and 4 for each addition section line.

At this point, the cross section is complete. Below is how a basic cross section may look in Grapher. 

This default layout of the cross section shows how the sections interact. It can be
visually enhanced by altering properties of the graph and of each line/scatter plot.

This graph can be used for publications, internal documents, or as a visual aid to determine the layout of your area. However, there are many items that you can change to make the graph more visually appealing

Changing Line and Fill Characteristics

One of the simplest changes to the graph would be to alter the line styles and/or colors associated with each section line. To do this, click once on the "Line/Scatter Plot 1" in the Object Manager. In the Property Inspector, click on the Line tab to open the Line Properties section. Change any of the line styles you desire. You can change the line color, width, style, and whether the line has arrows at the beginning or ending of the line.

Another simple change that makes a major difference in the presentation of the final graphic is to add fill colors. To add color fill between the curves, follow these directions:

  1. Click once on "Graph 1" in the Object Manager. In the Property Inspector, click on the Between Fill tab.
  2. Click the Add fill command where it says <Click here to add fill>. The Fills command should change to reflect Fill 1.
  3. Change the Plot one to show the first line/scatter plot: Line/Scatter Plot 1. Change the Plot two to show the second line/scatter plot: Line/Scatter Plot 2.
  4. Click the + sign next to the Fill style command. Change the Pattern to Solid. Change the Foreground to any color.
  5. Change any other properties of the fill you wish, including adding gradient fills or fill patterns other than solid colors to the area.
  6. Repeat steps 2 through 5 for the fill between each additional area.

For the final fill, you may wish to have the fill go from the last curve to the X Axis. To do this, click on the last curve added in the Object Manager. Click on the Fill tab in the Property Inspector. Change the Pattern, Foreground color, and any other properties that you wish. In the example below, the Use gradient fill box was checked and a custom gradient fill pattern was created using the Color fill command.

This graph contains color to add visual interest to your cross section.

Final Edits for the Color Cross Section

After the color has been added to the graph, it may be necessary to change the lengths of axes or add text to explain certain sections of the graph.

To alter an axis, click once on the axis to select it. In the Property Inspector, make any desired changes to items such as tick marks, tick labels, line properties, or the axis minimum and maximum properties. If you have changes that need to be made to both axes, click on one axis name in the Object Manager. Hold down the CTRL key on the keyboard and click on the other axis name. Both axes should then be selected. Any change that you make in the Property Inspector will be made to both axes.

To make full graph edits, click once on the entire graph ("Graph 1") in the Object Manager. In the Property Inspector, open the Title section. Change the Title by clicking on the <Click here to edit title> box. Another full graph edit that may be desired would be a background fill or a background line. These are added on the Background tab when the entire graph has been selected.

One final type of edit that may be desired would be to add text boxes or drawn objects. These can be added with the Draw | Text and Draw | Polyline commands. These types of edits will add additional information to areas of interest.

Grapher's ability to alter any portion of a graph and Surfer's ability to create grid and slice files combine to give a technical and aesthetic presentation for your cross sections.

This final cross section contains numerous edits to the axes, and line/scatter plots. In addition,
drawn text, polylines, and polygons have been added to create a presentation quality graphic.


Back to Newsletter Index

 

Home * Products * Gallery * Support * About Us * Register * Order * Demos * Sitemap

Privacy Policy