The ternary plot is a barycentric plot on three variables which sum to a constant. It graphically depicts the ratios of the three variables as positions in an equilateral triangle.
It is often used in physical chemistry, petrology, mineralogy, metallurgy, and other physical sciences to show the compositions of systems composed of three species.
Data Requirements
Every mod handles missing, corrupted and/or inconsistent data in different ways. It is advised to always review how the data is visualized.
To make the ternary plot work properly, the underlying data must be formatted in a certain way, with three numerical columns each representing different parts of a whole, per row.
The ternary plot assumes that values for each marker, across bottom (B), left (L) and right ® axis are a share of something normalizable to a SUM of B + L + R = 100% and the coordinates will be normalized as such.
Setting Up the Mod
In this example dataset, we have four columns: Sample, Quartz, Felspar, Lithics
Sample | Quartz | Felspar | Lithics |
---|---|---|---|
Sample 1 | 100 | 0 | 0 |
Sample 2 | 20 | 50 | 30 |
Sample 3 | 40 | 20 | 40 |
Sample 4 | 10 | 40 | 50 |
Sample 5 | 0 | 100 | 0 |
Sample 6 | 10 | 0 | 90 |
Sample 7 | 33.3 | 33.3 | 33.3 |
Sample 8 | 60 | 15 | 25 |
In the ternary plot configuration in Spotfire, we would specify the 'Felspar' column as Bottom axis, 'Quartz' columns as Left axis and 'Lithics' column as Right axis. We can also use the 'Sample' column as our Color by axis.
The end result will look something like this:
Configuring the Mod
Once the ternary plot has data provided, you can configure when to show or hide axis labels. The setting is accessed in Editing mode by clicking the settings button on the top right corner of the visualization.
Using the Mod
The ternary plot supports marking data and filtering data. Clicking on a marker will mark it. The ternary plot also allows marking of multiple markers using rectangular marking; whilst holding down the mouse click and dragging the cursor across the chart, you can mark one or multiple markers.
To unmark all marked markers, just click the background of the visualization canvas area.
Building the Project
In a terminal window:
- npm install
- npm start
In a new terminal window:
- npm run server
Help and Support
This Mod is not supported by Spotfire® Support.
In the event of issues or to suggest features and enhancements, submit an issue in the Mod's GitHub repository.
For general questions about Mods, please post a question in the Forum for Extensions & Mods to make it visible and routed to the appropriate team(s) to respond.
More Information About Spotfire® Mods
- Spotfire Community Exchange: A safe and trusted place to discover ready-to-use Mods
- Developer Documentation: Introduction and tutorials for Mods developers
- Mods code examples on GitHub: A public repository for example projects
Recommended Comments
There are no comments to display.