Skip to main content

A Python library for creating quaternary (tetrahedral) compositional plots

Project description

Quaternary Plots

A Python library for creating beautiful quaternary (tetrahedral) compositional plots using Plotly.

Installation

pip install quaternary-plots

Quick Start

import quaternary as quat
import numpy as np

# Create empty tetrahedron
fig = quat.tetrahedron(labels=['CaCO3', 'MgCO3', 'Na2CO3', 'K2CO3'])

# Add data points
compositions = np.array([
    [25, 25, 25, 25],  # Centroid
    [50, 30, 10, 10],  # Ca-rich
])
fig = quat.add_points(fig, compositions, name='Samples', color='red')

fig.show()

Features

  • 🎯 Plot quaternary compositional diagrams
  • 📊 Add points, lines, surfaces, and volumes
  • 🔄 Convert between barycentric and Cartesian coordinates
  • 🎨 Fully customizable colors, sizes, and styles
  • 📱 Interactive 3D visualization

Documentation

See examples/basic_usage.py for more examples.

License

GPL-3.0

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

quaternary_plots-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quaternary_plots-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file quaternary_plots-0.1.0.tar.gz.

File metadata

  • Download URL: quaternary_plots-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for quaternary_plots-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3ae26fb7792fdb055c58479eb20016e0f48138fee95cfc97d82c1164ee49e3f1
MD5 48b633ac4d452a6d27c37e46ab8b28e8
BLAKE2b-256 a4ee712ac1258924bd33b5a0ce658c05c507770fb6b23b68b0e2ef328f4eb361

See more details on using hashes here.

File details

Details for the file quaternary_plots-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for quaternary_plots-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2dda93e6a112d8dca823fff8432d0c03ff8006b4f990aa3d5e8427ec8fae93fa
MD5 88747b639a7ce25793051d46130b709e
BLAKE2b-256 8e542168abcdf1e92ee10f40104b05db086d1045c929652bb653c39dec82ed53

See more details on using hashes here.

Supported by

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