Skip to main content
pistachioplots


Plotting utilities for exploratory data analysis and time series, built on
polars, plotnine and pistachiots.

The package installs as 'pistachioplots' and imports as 'PistachioPlots'.


INSTALLATION

pip install pistachioplots


USAGE

import PistachioPlots as pst

Every function returns a plotnine plot, or a dictionary of plots when it is
asked for several at once. Variables can be given explicitly or left out, in
which case the function picks the columns whose type fits.


DISTRIBUTIONS

dist_density(df, var) histogram with a kernel density overlay, and
optional analytic densities on top
dist_density_cond(df, var, var_cat)
the same, conditioned on a categorical
variable, overlaid or in facets
dist_mass(df, var) bar chart of a categorical variable, with
percentage and count labels
dist_mass_cond(df, var1, var2)
the distribution of var1 conditioned on var2,
in facets or as side-by-side bars


TIME SERIES

ts(df, var, response) one plot per variable, or a single faceted one
ts_multiple(df, var) several series in one panel or in facets
ts_by_keys(df, var) panel data with one or two keys
time_breaks(plt, dates) x-axis breaks and date format

These take a TSPolars object from pistachiots. 'response' gives one variable
the first color and the first place in the legend. 'ts_breaks_params' controls
the breaks: 'jump' (the step between them), 'date_format' and 'plot_minor'.


CORRELATIONS

corrs(df, response) Pearson, Spearman and Kendall coefficients
against a response, with significance marks
corrs_matrix(df) correlation matrix as a heatmap

Lagged variables named L1x, L2x and so on are grouped and sorted by lag number.


SCATTER AND LINES

scatter(df, var) scatter matrix across the given variables
scatter(df, vary, varx) a response against one or several covariates
line(df, varx, vary) a simple line, optionally stepped or filled


THEME AND COLORS

theme_params_def the default theme settings; copy it, change
what you need and pass it as theme_params
colors_categ(series) the palette for a categorical variable
set_palette(colors) override the package palette

tms = pst.theme_params_def.copy()
tms['x_angle'] = 90
pst.dist_mass(df, 'region', theme_params = tms)


LICENSE

MIT. See the LICENSE.txt file.

Metadata

Release files for pistachioplots 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pistachioplots 0.1.2
File Size Uploaded Provenance
pistachioplots-0.1.2.tar.gz 23.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pistachioplots 0.1.2
File Interpreter ABI Platform
pistachioplots-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 48.2 kB

Release files / pistachioplots-0.1.2.tar.gz

Download URL pistachioplots-0.1.2.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4456f9382ff79ea015da3d1117e7a87d8b1ce570a9540609d2af75823c315106
BLAKE2b-256 checksum
How to use checksums
159a150e3085f42272fad10eede8fb2146540b93e0a8e1f02c7a44043289cddf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release files / pistachioplots-0.1.2-py3-none-any.whl

Download URL pistachioplots-0.1.2-py3-none-any.whl
Size 24.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93df880526f36f447b8c5db6328d2eb0a77b6c9bf44fd5ccae277a0ebf64385d
BLAKE2b-256 checksum
How to use checksums
eca2bb726a724a81ef443c70e0cde6d641f09934b2f2c4c2c7c1cf7612fccf82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Security for pistachioplots 0.1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page