<commit_before># Welcome!

<a href="https://pypi.python.org/pypi/python-ternary"><img src="https://img.shields.io/pypi/v/python-ternary.svg"/></a>
[![DOI](https://zenodo.org/badge/19505/marcharper/python-ternary.svg)](https://zenodo.org/badge/latestdoi/19505/marcharper/python-ternary)
[![Join the chat at https://gitter.im/marcharper/python-ternary](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/marcharper/python-ternary?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

# python-ternary

This is a plotting library for use with [matplotlib](http://matplotlib.org/index.html) to make [ternary plots](http://en.wikipedia.org/wiki/Ternary_plot)
plots in the two dimensional simplex projected onto a two dimensional plane.

The library provides functions for plotting projected lines, curves (trajectories), scatter plots, and heatmaps. There are [several examples](https://github.com/marcharper/python-ternary/blob/master/examples.py) and a short tutorial below.

Some ternary functions expect the simplex to be partititioned into some number of steps, determined by the scale parameter. A few functions will do this partitioning automatically for you, but when working with real data or simulation output, you may have partitioned already. If you are working with probability distributions, just use `scale=1` (the default). Otherwise the scale parameter effectively controls the resolution of many plot types (e.g. heatmaps).

# Gallery

<div style="text-align:center">

<img src ="/readme_images/boundary_and_gridlines.png" width="150" height="150"/>
<img src ="/readme_images/various_lines.png" width="150" height="150"/>
<img src ="/readme_images/colored_trajectory.png" width="150" height="150"/>
<img src ="/readme_images/scatter.png" width="150" height="150"/>
<img src ="/readme_images/heatmap_rsp.png" width="150" height="150"/>
<img src ="/readme_images/16_80_1.png" width="150" height="150"/>
<img src ="/readme_images/16_80_stationary.png" width="150" height="150"/>
<img src ="/readme_images/23_80_0.png" width="150" height="150"/>
<img src ="/readme_images/24_80_1.png" width="150" height="150"/>
<img src ="/readme_images/colored_boundary.png" width="150" height="150"/>
</div>
<commit_msg>Reorder images in readme.md<commit_after># Welcome!

<a href="https://pypi.python.org/pypi/python-ternary"><img src="https://img.shields.io/pypi/v/python-ternary.svg"/></a>
[![DOI](https://zenodo.org/badge/19505/marcharper/python-ternary.svg)](https://zenodo.org/badge/latestdoi/19505/marcharper/python-ternary)
[![Join the chat at https://gitter.im/marcharper/python-ternary](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/marcharper/python-ternary?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

# python-ternary

This is a plotting library for use with [matplotlib](http://matplotlib.org/index.html) to make [ternary plots](http://en.wikipedia.org/wiki/Ternary_plot)
plots in the two dimensional simplex projected onto a two dimensional plane.

The library provides functions for plotting projected lines, curves (trajectories), scatter plots, and heatmaps. There are [several examples](https://github.com/marcharper/python-ternary/blob/master/examples.py) and a short tutorial below.

Some ternary functions expect the simplex to be partititioned into some number of steps, determined by the scale parameter. A few functions will do this partitioning automatically for you, but when working with real data or simulation output, you may have partitioned already. If you are working with probability distributions, just use `scale=1` (the default). Otherwise the scale parameter effectively controls the resolution of many plot types (e.g. heatmaps).

# Gallery

<div style="text-align:center">

<img src ="/readme_images/16_80_1.png" width="150" height="150"/>
<img src ="/readme_images/16_80_stationary.png" width="150" height="150"/>
<img src ="/readme_images/23_80_0.png" width="150" height="150"/>
<img src ="/readme_images/24_80_1.png" width="150" height="150"/>
<img src ="/readme_images/heatmap_rsp.png" width="150" height="150"/>
<img src ="/readme_images/colored_boundary.png" width="150" height="150"/>
<img src ="/readme_images/boundary_and_gridlines.png" width="150" height="150"/>
<img src ="/readme_images/various_lines.png" width="150" height="150"/>
<img src ="/readme_images/colored_trajectory.png" width="150" height="150"/>
<img src ="/readme_images/scatter.png" width="150" height="150"/>

</div>

{'fraction_non_alphanumeric': 0.14659569749390108, 'fraction_numerical': 0.04080727434020847, 'mean_word_length': 5.959876543209877, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2509215', 'n_tokens_mistral': 1629, 'n_tokens_neox': 1454, 'n_words': 369}