tidydraws
A tidybayes-inspired data layer for declarative Bayesian visualisation in Python
tidydraws turns MCMC output (ArviZ) into tidy Polars frames that are ready to plot — one .to_pandas() away from any ggplot-like backend. It does no plotting itself. Three functions, three spaces:
| Function | Space | Plot archetype |
|---|---|---|
parameter_draws() |
parameter | density, forest, scatter |
prediction_draws() |
prediction | ribbon + line, fit + data |
compare_draws() |
comparison | prior vs posterior, intervals |
Install
With uv:
uv add tidydraws
With pip:
pip install tidydraws
If you want the latest functionality merged into main but not yet released, install directly from GitHub:
pip install git+https://github.com/drbenvincent/tidydraws.git
Or with uv:
uv add git+https://github.com/drbenvincent/tidydraws.git
Why tidydraws?
Plotting MCMC output in Python means manually slicing xarray dimensions, iterating groups, and aligning coordinates — imperative, verbose, error-prone. R's tidybayes solved this with a data layer that respects parameter space vs prediction space. tidydraws brings that to Python on Polars.
Backend-agnostic:
tidydrawsreturns PolarsDataFrames. Call.to_pandas()to bridge to lets-plot, plotnine, or any library that takes pandas. See the examples for both lets-plot and plotnine versions.
Inspired by tidybayes for R.
Metadata
Release files for tidydraws 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tidydraws-0.4.3.tar.gz | 476.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tidydraws-0.4.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 489.2 kB
Release files / tidydraws-0.4.3.tar.gz
| Download URL | tidydraws-0.4.3.tar.gz |
|---|---|
| Size | 476.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
871cfa397904848d2e4d0dd8b1e78ac3627b71bfc666e610b349be515ad58c25
|
|
BLAKE2b-256 checksum How to use checksums |
2a2868e51e5beb7cdb7c360e431f9cd4abb7278bd83afa4d7a41ced513d9b4b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.
Transparency logRelease files / tidydraws-0.4.3-py3-none-any.whl
| Download URL | tidydraws-0.4.3-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6050659a81ea0253047179ff0e8b811b1e1e4b07e1d6af6d9bb951add2f1ef6
|
|
BLAKE2b-256 checksum How to use checksums |
185cbfa6ba81d84018ba6c59b137b8e4fa61e59112deb0f7aaa56079de0b7856
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.
Transparency log