pyrolite.plot.templates

A utility submodule for standardised plot templates to be added to matplotlib axes.

pyrolite.plot.templates.pearceThNbYb(ax=None, relim=True, color='k', **kwargs)[source]

Adds the Th-Nb-Yb delimiter lines from Pearce (2008) [1] to an axes.

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to add the template onto.

  • relim (bool) – Whether to relimit axes to fit the built in ranges for this diagram.

  • color (str) – Line color for the diagram.

References

Returns:

ax

Return type:

matplotlib.axes.Axes

pyrolite.plot.templates.pearceTiNbYb(ax=None, relim=True, color='k', annotate=True, **kwargs)[source]

Adds the Ti-Nb-Yb delimiter lines from Pearce (2008) [2] to an axes.

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to add the template onto.

  • relim (bool) – Whether to relimit axes to fit the built in ranges for this diagram.

  • color (str) – Line color for the diagram.

References

Returns:

ax

Return type:

matplotlib.axes.Axes

pyrolite.plot.templates.JensenPlot(ax=None, add_labels=False, color='k', **kwargs)[source]

Jensen Plot for classification of sub-alkaline volcanic rocks [3].

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to add the template on to.

  • add_labels (bool) – Whether to include the labels for the diagram.

  • color (str) – Line color for the diagram.

Returns:

ax

Return type:

matplotlib.axes.Axes

References

Notes

Diagram used for the classification classification of subalkalic volcanic rocks. The diagram is constructed for molar cation percentages of Al, Fe+Ti and Mg, on account of these elements’ stability upon metamorphism. This particular version uses updated labels relative to Jensen (1976), in which the fields have been extended to the full range of the ternary plot.

pyrolite.plot.templates.TAS(ax=None, add_labels=False, which_labels='ID', relim=True, color='k', which_model=None, **kwargs)[source]

Adds the TAS diagram to an axes. Diagram from Middlemost (1994) [4], a closed-polygon variant after Le Bas et al (1992) [5].

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to add the template on to.

  • add_labels (bool) – Whether to add labels at polygon centroids.

  • which_labels (str) – Which labels to add to the polygons (e.g. for TAS, ‘volcanic’, ‘intrusive’ or the field ‘ID’).

  • relim (bool) – Whether to relimit axes to fit the built in ranges for this diagram.

  • color (str) – Line color for the diagram.

  • which_model (str) – The name of the model variant to use, if not Middlemost.

Returns:

ax

Return type:

matplotlib.axes.Axes

References

pyrolite.plot.templates.USDASoilTexture(ax=None, add_labels=False, color='k', **kwargs)[source]

United States Department of Agriculture Soil Texture classification model [6] [7].

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to add the template on to.

  • add_labels (bool) – Whether to include the labels for the diagram.

  • color (str) – Line color for the diagram.

Returns:

ax

Return type:

matplotlib.axes.Axes

References

pyrolite.plot.templates.QAP(ax=None, add_labels=False, which_labels='ID', color='k', **kwargs)[source]

IUGS QAP ternary classification diagram [8] [9].

Parameters:
  • ax (matplotlib.axes.Axes) – Ternary axes to add the diagram to.

  • add_labels (bool) – Whether to add labels at polygon centroids.

  • which_labels (str) – Which data to use for field labels - field ‘name’ or ‘ID’.

  • color (str) – Color for the polygon edges in the diagram.

References

pyrolite.plot.templates.FeldsparTernary(ax=None, add_labels=False, which_labels='ID', mode='miscibility-gap', color='k', **kwargs)[source]

Simplified feldspar classifcation diagram, based on a version printed in the second edition of ‘An Introduction to the Rock Forming Minerals’ (Deer, Howie and Zussman). [#pyrolite.plot.templates.feldspar.FeldsparTernary_1]

Parameters:
  • ax (matplotlib.axes.Axes) – Ternary axes to add the diagram to.

  • add_labels (bool) – Whether to add labels at polygon centroids.

  • which_labels (str) – Which data to use for field labels - field ‘name’ or ‘ID’.

  • mode (str) – Which mode of the diagram to use; the two implemented for the feldspar ternary diagram are ‘default’ and ‘miscibility-gap’, the second of which provides a simplified approximation of the miscibility gap between k-feldspar and plagioclase.

  • color (str) – Color for the polygon edges in the diagram.

References

pyrolite.plot.templates.SpinelFeBivariate(ax=None, add_labels=False, which_labels='ID', color='k', **kwargs)[source]

Fe-Spinel classification, designed for data in atoms per formula unit.

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to add the diagram to.

  • add_labels (bool) – Whether to add labels at polygon centroids.

  • which_labels (str) – Which data to use for field labels - field ‘name’ or ‘ID’.

  • color (str) – Color for the polygon edges in the diagram.

pyrolite.plot.templates.SpinelTrivalentTernary(ax=None, add_labels=False, which_labels='ID', color='k', **kwargs)[source]

Spinel Trivalent Ternary classification - designed for data in atoms per formula unit.

Parameters:
  • ax (matplotlib.axes.Axes) – Ternary axes to add the diagram to.

  • add_labels (bool) – Whether to add labels at polygon centroids.

  • which_labels (str) – Which data to use for field labels - field ‘name’ or ‘ID’.

  • color (str) – Color for the polygon edges in the diagram.

pyrolite.plot.templates.Pettijohn(ax=None, add_labels=False, which_labels='ID', relim=True, color='k', **kwargs)[source]

Adds the Pettijohn (1973) [#pyrolite.plot.templates.sandstones.Pettijohn_1] sandstones classification diagram.

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to add the template on to.

  • add_labels (bool) – Whether to add labels at polygon centroids.

  • which_labels (str) – Which data to use for field labels - field ‘name’ or ‘ID’.

  • relim (bool) – Whether to relimit axes to fit the built in ranges for this diagram.

  • color (str) – Line color for the diagram.

Returns:

ax

Return type:

matplotlib.axes.Axes

References

pyrolite.plot.templates.Herron(ax=None, add_labels=False, which_labels='ID', relim=True, color='k', **kwargs)[source]

Adds the Herron (1988) [#pyrolite.plot.templates.sandstones.Herron_1] sandstones classification diagram.

Parameters:
  • ax (matplotlib.axes.Axes) – Axes to add the template on to.

  • add_labels (bool) – Whether to add labels at polygon centroids.

  • which_labels (str) – Which data to use for field labels - field ‘name’ or ‘ID’.

  • relim (bool) – Whether to relimit axes to fit the built in ranges for this diagram.

  • color (str) – Line color for the diagram.

Returns:

ax

Return type:

matplotlib.axes.Axes

References