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.0

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.0
File Size Uploaded
pistachioplots-0.1.0.tar.gz 23.8 kB Details

Built distribution (wheel)

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

Total release size: 49.1 kB

Release files / pistachioplots-0.1.0.tar.gz

Download URL pistachioplots-0.1.0.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bdbe6dcfb8e3b4d1d69024e9e7d52f9400e1107d1837ceebe66f078193c874f1
BLAKE2b-256 checksum
How to use checksums
7c74c033494748b163f454ecb6109cb5cc8a7b69916a8c1332bd118f75b1c87a
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.0-py3-none-any.whl

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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