:orphan:



.. _sphx_glr_examples:

Examples
==================

This example gallery includes a variety of examples for using pyrolite
which you can copy, download and alter, or run on Binder.


.. raw:: html

    <div class="sphx-glr-clear"></div>



.. _sphx_glr_examples_plotting:

Plotting Examples
~~~~~~~~~~~~~~~~~~~~

pyrolite provides some functionality for basic plotting of geochemical data in the form
of spidergrams (pyrolite.plot.spider), ternary diagrams (pyrolite.plot.tern) and
density diagrams (i.e. 2D histograms, pyrolite.plot.density).



.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="pyrolite includes some ready-made templates for well-known plots. These can be used to create n...">

.. only:: html

 .. figure:: /examples/plotting/images/thumb/sphx_glr_templates_thumb.png

     :ref:`sphx_glr_examples_plotting_templates.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/plotting/templates

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Stem plots are commonly used to visualise discrete distributions of data, and are useful to hig...">

.. only:: html

 .. figure:: /examples/plotting/images/thumb/sphx_glr_stem_thumb.png

     :ref:`sphx_glr_examples_plotting_stem.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/plotting/stem

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Ternary Plots">

.. only:: html

 .. figure:: /examples/plotting/images/thumb/sphx_glr_ternary_thumb.png

     :ref:`sphx_glr_examples_plotting_ternary.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/plotting/ternary

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="REE Radii Plots">

.. only:: html

 .. figure:: /examples/plotting/images/thumb/sphx_glr_REE_v_radii_thumb.png

     :ref:`sphx_glr_examples_plotting_REE_v_radii.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/plotting/REE_v_radii

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Visualisation of data which has high dimensionality is challenging, and one solution is to prov...">

.. only:: html

 .. figure:: /examples/plotting/images/thumb/sphx_glr_manifold_vis_thumb.png

     :ref:`sphx_glr_examples_plotting_manifold_vis.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/plotting/manifold_vis

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Parallel coordinate plots are one way to visualise data relationships and clusters in higher di...">

.. only:: html

 .. figure:: /examples/plotting/images/thumb/sphx_glr_parallel_thumb.png

     :ref:`sphx_glr_examples_plotting_parallel.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/plotting/parallel

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="While density plots are useful summary visualizations for large datasets, scatterplots are more...">

.. only:: html

 .. figure:: /examples/plotting/images/thumb/sphx_glr_heatscatter_thumb.png

     :ref:`sphx_glr_examples_plotting_heatscatter.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/plotting/heatscatter

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Spiderplots &amp; Density Spiderplots">

.. only:: html

 .. figure:: /examples/plotting/images/thumb/sphx_glr_spider_thumb.png

     :ref:`sphx_glr_examples_plotting_spider.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/plotting/spider

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="While individual point data are useful, we commonly want to understand the the distribution of ...">

.. only:: html

 .. figure:: /examples/plotting/images/thumb/sphx_glr_density_thumb.png

     :ref:`sphx_glr_examples_plotting_density.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/plotting/density
.. raw:: html

    <div class="sphx-glr-clear"></div>



.. _sphx_glr_examples_geochem:

Geochemistry Examples
~~~~~~~~~~~~~~~~~~~~~



.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="pyrolite includes a limited mineral database which is useful for for looking up endmember compo...">

.. only:: html

 .. figure:: /examples/geochem/images/thumb/sphx_glr_mineral_mindb_thumb.png

     :ref:`sphx_glr_examples_geochem_mineral_mindb.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/geochem/mineral_mindb

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Unit Scaling">

.. only:: html

 .. figure:: /examples/geochem/images/thumb/sphx_glr_scaling_thumb.png

     :ref:`sphx_glr_examples_geochem_scaling.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/geochem/scaling

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="One of pyrolite&#x27;s strengths is converting mixed elemental and oxide data to a new form. The sim...">

.. only:: html

 .. figure:: /examples/geochem/images/thumb/sphx_glr_convert_chemistry_thumb.png

     :ref:`sphx_glr_examples_geochem_convert_chemistry.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/geochem/convert_chemistry

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Geochemical Indexes and Selectors">

.. only:: html

 .. figure:: /examples/geochem/images/thumb/sphx_glr_indexes_selectors_thumb.png

     :ref:`sphx_glr_examples_geochem_indexes_selectors.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/geochem/indexes_selectors

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A selection of reference compositions are included in pyrolite, and can be easily accessed with...">

.. only:: html

 .. figure:: /examples/geochem/images/thumb/sphx_glr_normalization_thumb.png

     :ref:`sphx_glr_examples_geochem_normalization.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/geochem/normalization

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Orthogonal polynomial decomposition can be used for dimensional reduction of smooth function ov...">

.. only:: html

 .. figure:: /examples/geochem/images/thumb/sphx_glr_lambdas_thumb.png

     :ref:`sphx_glr_examples_geochem_lambdas.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/geochem/lambdas

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A common task when working with mineral chemistry data is to take measured compositions and dec...">

.. only:: html

 .. figure:: /examples/geochem/images/thumb/sphx_glr_mineral_endmembers_thumb.png

     :ref:`sphx_glr_examples_geochem_mineral_endmembers.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/geochem/mineral_endmembers

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="pyrolite incldues a few sets of reference tables for ionic radii in aangstroms (Å) from [Shanno...">

.. only:: html

 .. figure:: /examples/geochem/images/thumb/sphx_glr_ionic_radii_thumb.png

     :ref:`sphx_glr_examples_geochem_ionic_radii.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/geochem/ionic_radii

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="    This example follows that given during a Institute of Advanced Studies Masterclass     with...">

.. only:: html

 .. figure:: /examples/geochem/images/thumb/sphx_glr_mineral_lattice_thumb.png

     :ref:`sphx_glr_examples_geochem_mineral_lattice.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/geochem/mineral_lattice
.. raw:: html

    <div class="sphx-glr-clear"></div>



.. _sphx_glr_examples_comp:

Compositional Data Examples
~~~~~~~~~~~~~~~~~~~~~~~~~~~



.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="pyrolite includes a few functions for dealing with compositional data, at the heart of which ar...">

.. only:: html

 .. figure:: /examples/comp/images/thumb/sphx_glr_logtransforms_thumb.png

     :ref:`sphx_glr_examples_comp_logtransforms.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/comp/logtransforms

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Log Ratio Means">

.. only:: html

 .. figure:: /examples/comp/images/thumb/sphx_glr_logratiomeans_thumb.png

     :ref:`sphx_glr_examples_comp_logratiomeans.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/comp/logratiomeans

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Compositional Data?">

.. only:: html

 .. figure:: /examples/comp/images/thumb/sphx_glr_compositional_data_thumb.png

     :ref:`sphx_glr_examples_comp_compositional_data.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/comp/compositional_data
.. raw:: html

    <div class="sphx-glr-clear"></div>



.. _sphx_glr_examples_util:

Utility Examples
~~~~~~~~~~~~~~~~~~~~

pyrolite includes a range of utilities for everything from dealing with
the web to plotting, synthetic data and machine learning. While most of these
are used as part of the core functions of pyrolite, you may also find
other uses for them, and this section provides some simple examples for
some of these.



.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Some simple discrimination methods are implemented, including the Total Alkali-Silica (TAS) cla...">

.. only:: html

 .. figure:: /examples/util/images/thumb/sphx_glr_TAS_thumb.png

     :ref:`sphx_glr_examples_util_TAS.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/util/TAS

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="pyrolite includes a simple geological timescale, based on a recent verion of the International ...">

.. only:: html

 .. figure:: /examples/util/images/thumb/sphx_glr_timescale_thumb.png

     :ref:`sphx_glr_examples_util_timescale.py`

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/util/timescale
.. raw:: html

    <div class="sphx-glr-clear"></div>



.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
