Jump to content
  • Ternary Plot Mod for Spotfire®


    Version 1.0.0, released June 2022

    exchange_-_screenshot_ternary_plot_mod_0.png.193b9c3f6649df6ba9d326b5c13154a5.png

     

    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.

    image.thumb.png.ff10e3b937394c64360c7e5b36cf264f.png

    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:

    screen_shot_2022-06-17_at_14_21.png.5e1b3a98a5b5ad3868d85cf964290ef1.png

    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


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...