Professional Documents
Culture Documents
A piper plot is a way of visualizing the chemistry of a rock, soil, or water sample. It’s comprised of three
pieces: a ternary diagram in the lower left representing the cations, a ternary diagram in the lower right
representing the anions, and a diamond plot in the middle representing a combination of the two. To
plot, take the normalized concentrations of each of your three cations for a sample and plot them on
the lower left ternary diagram, using the colored axes as guides. Repeat for your anions on the lower
right ternary diagram. Now, following a line parallel to the outer axis of each ternary diagram, project
each point in the ternary diagrams upward until they intersect with one another in the diamond plot.
This is where you draw the third point. These three points represent one sample. Repeat for your other
samples.
The diamond diagram tells you different things depending on what you’re plotting. For groundwater, for
example, the top quadrant is calcium sulfate waters (gypsum ground water and mine drainage), the left
quadrant is calcium bicarbonate waters (shallow fresh ground water), the right quadrant is sodium
chloride waters (marine and deep ancient ground water), and the bottom quadrant is sodium
bicarbonate waters (deep ground water influenced by ion exchange).
Although Grapher doesn’t explicitly have a piper plot – plot type, there is a GRF file and a data file
available online that you can use together as a template to create your own piper plot.
1. Navigate to the Grapher knowledge base article “Can Grapher create a Piper plot? If so, how?”
and download the Piper.zip file.
2. Unzip the file to extract the GRF grapher file and the XLSX data file. The data file displays ID,
cations, anions, and two combined columns. The cations and anions should all be normalized to
add up to 100%.
*Note: The D2R part is really important here since it converts 30 degrees to radians, which is
necessary before you can calculate the sine. If you’re modifying this file in Excel, the equation
will update as soon as you input your own data, but for your own information the equivalent
command to sin(D2R(30)) is SIN(30*PI()/180) or SIN(RADIANS(30)).
5. Use File | Save to save the data file to the same name, or File | Save As to save to your own
name.
6. Use File | Open to open the GRF file that came in the ZIP file you downloaded.
7. If you saved your data to a new name, click on Piper Points | Curve 1 in the Object Manager.
8. In the Plot tab of the Property Manager, change the Worksheet to your new data file.
9. Repeat for Right Ternary and Left Ternary | Ternary Plot 1.
Notice that there and numbers and letters displaying in the diamond plot rather than symbols. This is
because these are labels displaying from the first column of the data file (the symbols have been turned
off). To plot the symbols click on Curve 1 in the Piper Points graph. In the Symbol tab of the Property
Manager increase the Symbol frequency to 1. Now go to the Labels tab and uncheck the Display labels
box to turn off the labels.
1. Add a ‘Data’ column to your data file containing 0-100 ascending in increments of 20. This
column has already been added to the XLSX file as Column L: Left Ternary Axis Locations.
2. Add a ‘Labels’ column to your data file containing 100-0 descending in increments of 20. This
column has already been added to the XLSX file as Column M: Left Ternary Axis Labels.
3. Select the plot you want to reverse the axis for in the Object Manager.
4. In the Tick Labels tab of the Property Manager expand Major label text and:
a. Change Label source to From worksheet.
b. Select your worksheet from the cell next to Worksheet.
c. Change Data column to your ‘Data’ column.
d. Change Label column to your ‘Label’ column.
You can customize your piper plot by changing the symbols. This would be useful if you were plotting
the results for multiple samples in a single piper plot. To create something akin to a ‘classed ternary
diagram’, which doesn’t currently exist in Grapher, you will need to add a symbol column to your data
file. To do so:
1. In the Search bar of your Start menu type ‘charmap’ and hit Enter to open your computer’s
character map. This tells you what symbols in each font are mapped to what keyboard
character.
2. Choose your font from the dropdown at the top (for example: GSI Default Symbols).
3. Double click your desired symbol (for example: ) and then hit the Copy button. In your
worksheet, hit Ctrl+V to paste into the desired row of the Symbol column.
*Note: Certain characters may mean something special in Grapher, so they may be changed. For
example, in the GSI Default Symbols font pastes into the worksheet as a %, which changes
to a numeric 0 as soon as you leave the cell because % is a numeric formatting option in
Grapher. To fix this, you will need to designate this cell as text. You can do this by either adding
a ‘ before the % or by typing in your symbol color before the symbol. For more on that, see step
7.
4. Copy and paste this row into any other rows where you wish to use this column.
5. In the character map, delete the symbol in the box and the bottom and choose your next
symbol.
6. Repeat steps 3-5 until you’ve chosen a symbol for each row in your worksheet.
7. To customize the colors for each of our custom symbols, we will add math text instructions to
each cell in the Symbol column designating the color. There are certain colors that can be
designated by name, such as red, blue, and black. For a full list, search for Math Text Instructions
in the Help. Using these types of colors, we can set our ’s to all be red with this in each cell:
\red >.For any other color, you will need to designate the RGB values of the color. To determine
the RGB color, click on one of the ternary plots and then go to the Line tab in the Property
Manager. Choose your color from the dropdown list. Expand the dropdown again and click the
Custom button at the bottom. In the Custom tab it will display the RGB values of the selected
color. To set these ’s to Light Orange instead, we will use \rgbr255 \rgbg153 \rgbb51 >.
Here \rgbr designates the R value, \rgbg designates the G value, and \rgbb designates the B
value.
8. In the Plot tab, select Curve 1 in the Object Manager.
9. In the Symbol tab of the Property Manager make sure the symbol Frequency is 0.
10. In the Labels tab check the box to Display labels.
a. Set the Horizontal alignment and the Vertical alignment both to Center and verify that the X
offset and Y offset are both 0, so the label appears exactly where the symbol would have.
b. Change the Column to your symbol column.
c. Change your Face in the Font section to GSI Default Symbols (or whatever font you chose
symbols from) to display the symbol you chose from the character map rather than the
character it’s mapped to.
11. Select Right Ternary | Ternary Plot 1 in the Object Manager.
12. In the Symbol tab of the Property Manager set Size to 0
13. In the Labels tab check the box to Display labels.
a. Set the Horizontal alignment and the Vertical alignment both to Center and verify that the X
offset and Y offset are both 0, so the label appears exactly where the symbol would have.
b. Uncheck Include X value, Include Y value, and Include Z value.
c. Check the box to Use worksheet labels and set the Column to your symbol column.
d. Change your Face in the Font section to GSI Default Symbols (or whatever font you chose
your symbols from) to display the symbol you chose from the character map rather than the
character it’s mapped to.
14. Repeat steps 8-10 for Left Ternary | Ternary Plot 1.
How can I create a legend showing each different symbol?
Let’s say I use the GSI Default Symbols characters , , , and in my plot [represented in the
Arial font by >, ), %, and “]
1. Go to Draw | Text.
2. Click on the page where you want your legend.
3. Set size to 12 points. Type the following with spaces in between each row:
> – Sample 1
) – Sample 2
% – Sample 3
“ – Sample 4
3. Highlight each empty space between lines and make the size 6.
4. Highlight >. Change the font to GSI Default Symbols and the color to red.
5. Repeat step 4 for the other symbols, choosing the appropriate color for that symbol.
6. If you want you can draw a rounded rectangle (Draw | Rounded Rectangle) and then go to
Arrange | Group | Group to group the rectangle and the text into a single object (this will keep
the pieces together if you move or resize the legend).
1. Select Ternary Z Axis under the Right Ternary graph in the Object Manager.
2. In the Grid Lines tab of the Property Manager check the box next to At major ticks.
3. If you wish to turn off the tick marks, in the Tick Marks tab of the Property Manager make sure
both Show ticks on top and Show ticks on bottom are unchecked.
4. Repeat steps 1-3 for Ternary Y Axis and Ternary X Axis.
5. Repeat steps 1-4 for the Left Ternary graph.
6. Select Ternary Z Axis under Upper right side up in the Object Manager.
7. In the Grid Lines tab of the Property Manager check the box next to At major ticks.
8. If you wish to turn off the tick marks, in the Tick Marks tab of the Property Manager make sure
both Show ticks on top and Show ticks on bottom are unchecked.
9. Turn on Ternary X Axis under Upper right side up by checking the box next to it in the Object
Manager.
10. Select Ternary X Axis.
11. In the Grid Lines tab of the Property Manager check the box next to At major ticks.
12. If you wish to turn off the tick marks, in the Tick Marks tab of the Property Manager make sure
both Show ticks on top and Show ticks on bottom are unchecked.
13. In the Axis tab click the Editor button under Axis title. Delete the text in the box and click OK.
14. Repeat steps 6-13 for Upside down.
15. In the Line tab set the Style to Invisible.