cantuccio: yet another corner plot library
can·tuc·cio | /kan'tutːʃo/ noun [masculine]
- an Italian biscuit from Tuscany.
- corner, nook.
cantuccio is a Python library for creating corner plots, automatically handling the layout and size of labels, ticks, and legends. It is designed to be flexible and easy to use, allowing users to create publication-quality corner plots with minimal code. When dealing with large datasets, cantuccio can utilize the KDEpy package for faster KDE estimation.
Visual choices are inspired by many of the existing corner plot libraries, with particular credit to corner, chainconsumer, cornetto, and makecorner.
Installation
You can install cantuccio using pip:
This project is managed by uv. To set up the development environment, install uv if needed:
curl -LsSf https://astral.sh/uv/install.sh | sh
Then, clone the repository and install the package in editable mode:
git clone https://github.com/asantini29/cantuccio
cd cantuccio
uv sync
uv run pip install -e .
Alternatively, you can install the latest version directly from PyPI:
pip install cantuccio
Example
Here is a simple example of how to use cantuccio to create a corner plot:
import numpy as np
import cantuccio as ct
# Generate some random data
data = np.random.randn(1000, 3)
labels = ['x', 'y', 'z']
data_dict = {label: data[:, i] for i, label in enumerate(labels)}
# Create a corner plot
fig, axs = ct.cornerplot(data_dict)
fig.show()
AI Statement
This project made use of generative AI. All the outputs have been reviewed and edited to ensure quality and consistency.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Release files for cantuccio 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cantuccio-0.4.1.tar.gz | 37.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cantuccio-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.4 kB
Release files / cantuccio-0.4.1.tar.gz
| Download URL | cantuccio-0.4.1.tar.gz |
|---|---|
| Size | 37.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
807d173b3244749219b2862157a67dd3eda2292801917d778e287ba859361246
|
|
BLAKE2b-256 checksum How to use checksums |
7acf6fb4184d098ad343912940246479946d41d5a4246abfbe1d774925ba82e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / cantuccio-0.4.1-py3-none-any.whl
| Download URL | cantuccio-0.4.1-py3-none-any.whl |
|---|---|
| Size | 33.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e1abcc5599116eb376e00e634fb9df0c6bba57469992c3b0fef814eddce32ba
|
|
BLAKE2b-256 checksum How to use checksums |
a1877f5969b66bfab982f6150940727ce34b334a0f8ef09a9ccab965d309092d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|