morganjwilliams / pyrolite

A set of tools for getting the most from your geochemical data.
https://pyrolite.readthedocs.io
Other
132 stars 36 forks source link

Additional Lithogeochemical plots [FEATURE] #26

Open Antoine-Cate opened 4 years ago

Antoine-Cate commented 4 years ago

Is your feature request related to a problem? Please describe. In addition to the TAS, other commonly used diagrams could be added.

Describe the solution you'd like Using a template, the following diagrams could be added:

Describe alternatives you've considered I do not see other alternatives to add new diagrams.

Additional context I would love to participate building this diagrams library.

Relevant References

morganjwilliams commented 4 years ago

These would be some good additions to pyrolite.plot.templates, which currently hosts the TAS and Pearce diagrams.

I'll have a think about a good way to do this and keep all the metadata (axes variables, values, limits and descriptions of conditions for which the diagrams were intended to be applied - some are more restrictive!).

My first approach would be to use a subclassed template class with a method to add it to an axes. Then write up a bit of a guide for constructing these templates and submitting them as part of the docs development guide.

@Antoine-Cate and others who come across this issue, please feel free add your own (design and specific template) suggestions here too!

morganjwilliams commented 4 years ago

The Pearce diagrams are constructed from specified geometric components which preserve some of this information (i.e. line labels etc), but there are likely a much better ways to achieve this. It'd also be great to make this a bit more readable and approachable for python beginners.

morganjwilliams commented 4 years ago

Another thing to keep in mind is that pyrolite will eventually move towards having multiple plotting backends (to leverage interactive plotting, likely largely through pandas-based interfaces to start with). This is part of the reason that the Pearce diagrams were constructed with the geometry decoupled from the plotting.