Git Product home page Git Product logo

qfl-pettijohn-ternary's Introduction

qfl_tern

Ternary plotting but specifically aimed at those working in geology who want to plot petrograpic data. Quartz, feldspar and lithic data derived from petrographic analysis can be plotted on a QFL diagram as per Pettijohn (1977) to gain an idea of their petrographic classification. Recently added the Dickenson (1983) classification diagram.

This repo includes a notebook to demonstrate the use of the QFL ternary as well as the file to run the plotting.

classified_data, makefig.plot = plot_qfl(data, top=quartz, left=fsp, right=lithic, matrix=matrix, plottype='Pettijohn_1977' , toplab='Q', leftlab='F', rightlab='L', grid=True, color='r', size=15)

Parameters:

data: dataframe
pandas data frame containing the data to which classifications can be appended

top, left, right: str or array-like
the three paramaters to plot. Commonly these will be 1D arrays, but can also be strings referencing columns in the
dataframe

matrix: str or array-like, optional, default=None
if plotting petrographic data clay matrix values can be included. Commonly this will be a 1D array, but can also be
a string referencing a column in the dataframe

plottype: str, optional, default='blank'
The background on which to plot the data, options are 'Dickinson_1983', 'Pettijohn_1977' or 'blank'.
                                   
toplab, leftlab, rightlab: str, optional
The apex labels as strings
    
grid: bool, optional, default=False
To plot grid and axis ticks
 
color: color, optional
The marker color

size: scaler, optional
The marker size   

Returns:

final_data: dataframe
The original dataframe with classifications column added, returns None if blank backgound

fig: pyploy figure
Shown with plt.show()

qfl-pettijohn-ternary's People

Contributors

johnmartin27 avatar trqmorgan avatar zimshady avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

qfl-pettijohn-ternary's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.