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

1

Pearce J. A. (2008) Geochemical fingerprinting of oceanic basalts with applications to ophiolite classification and the search for Archean oceanic crust. Lithos 100, 14–48. doi: 10.1016/j.lithos.2007.06.016

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

2

Pearce J. A. (2008) Geochemical fingerprinting of oceanic basalts with applications to ophiolite classification and the search for Archean oceanic crust. Lithos 100, 14–48. doi: {pearce2008}

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

3

Jensen, L. S. (1976). A new cation plot for classifying sub-alkaline volcanic rocks. Ontario Division of Mines. Miscellaneous Paper No. 66.

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

4

Middlemost, E. A. K. (1994). Naming materials in the magma/igneous rock system. Earth-Science Reviews, 37(3), 215–224. doi: 10.1016/0012-8252(94)90029-9

5

Le Bas, M.J., Le Maitre, R.W., Woolley, A.R. (1992). The construction of the Total Alkali-Silica chemical classification of volcanic rocks. Mineralogy and Petrology 46, 1–22. doi: 10.1007/BF01160698

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

6

Soil Science Division Staff (2017). Soil Survey Manual. C. Ditzler, K. Scheffe, and H.C. Monger (eds.). USDA Handbook 18. Government Printing Office, Washington, D.C.

7

Thien, Steve J. (1979). A Flow Diagram for Teaching Texture-by-Feel Analysis. Journal of Agronomic Education 8:54–55. doi: 10.2134/jae.1979.0054

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

8

Streckeisen, A. Classification and nomenclature of plutonic rocks recommendations of the IUGS subcommission on the systematics of Igneous Rocks. Geol Rundsch 63, 773–786 (1974). doi: 10.1007/BF01820841

9

Le Maitre,R.W. 2002. Igneous Rocks: A Classification and Glossary of Terms : Recommendations of International Union of Geological Sciences Subcommission on the Systematics of Igneous Rocks. Cambridge University Press, 236pp

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

10

Deer, W. A., Howie, R. A., & Zussman, J. (2013). An introduction to the rock-forming minerals (3rd ed.). Mineralogical Society of Great Britain and Ireland.

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

11

Pettijohn, F. J., Potter, P. E. and Siever, R. (1973). Sand and Sandstone. New York, Springer-Verlag. 618p. doi: 10.1007/978-1-4615-9974-6

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

12

Herron, M.M. (1988). Geochemical classification of terrigenous sands and shales from core or log data. Journal of Sedimentary Research, 58(5), pp.820-829. doi: 10.1306/212F8E77-2B24-11D7-8648000102C1865D