A lightweight Python plotting library for creating plots in the PSSG style.
A quick demo of plotting a simple bar chart:
from pssgplot import PlotEnvironment, BarPlot
import pandas as pd
with PlotEnvironment():
df = pd.DataFrame({
"x": ["A", "B", "C", "D"],
"y": [1, 2, 3, 4],
})
chart = BarPlot()
chart.plot(data=df, x="x", y="y", title="A simple bar chart")
# animate bar-by-bar or group-by-group to use in slides
chart.animate(by='column', save_dir='output')
chart.save('output/simple-bar-chart.png')Setting up with uv is straightforward:
uv venv
source .venv/bin/activate
uv pip install -e pssg-plots/
uv run plotting-script.pyYou can also just use vanilla pip and virtualenvs if you'd like.
For more details and demos, check out the example files: