Skip to main content

Ternary plots as projections of Matplotlib

Project description

PyPI version Downloads Conda Version Conda Downloads

GitHubActions CircleCI


Mpltern ( is a Python plotting library based on Matplotlib specifically designed for ternary plots. Mpltern is implemented as a new projection for Matplotlib, with introducing e.g. new Transform classes for ternary plots. The followings are the features of mpltern when compared with other ternary-plot libraries:

  • Many things one expects essentially possible using Matplotlib can be done also in mpltern, without e.g. ternary-to-Cartesian conversions on the user side

  • For the same plotting styles, mpltern offers the same or very similar method names as Matplotlib does; you do not need to learn many new commands in addition to those for Matplotlib

  • Tick markers, tick labels, and axis labels are automatically positioned with reasonable paddings inherited from Matplotlib; this allows users e.g. faster production of ternary plots with publication quality

  • tight_layout and constrained_layout

  • Easy combination with normal Matplotlib plots

  • Easy application of seaborn styles

  • Working also in Matplotlib interactive modes inside e.g. Jupyter notebooks


See the install documentation.

Basic Usage

See the basic usage documentation.

See more examples in the gallery.

How to Cite mpltern

The author requests to cite mpltern via the DOI above if mpltern contributes to a scientific publication. Of course, Matplotlib should be also very much acknowledged when using mpltern.


Yuji Ikeda (GitHub, Google Scholar, ResearchGate)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpltern-0.5.0.tar.gz (1.3 MB view hashes)

Uploaded source

Built Distribution

mpltern-0.5.0-py3-none-any.whl (29.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page