🍅 Plost
A deceptively simple plotting library for Streamlit.
Because you've been writing plots wrong all this time.
👇 THE REAL README IS ACTUALLY HERE:
👆 You can find interactive examples, documentation, and much more in the app above.
Our goal
- What you need 99% of the time is insanely easy
- The other 1% is impossible. Use Vega-Lite instead!
Getting started
pip install plost
Basics
Plost makes it easy to build common plots using the Vega-Lite library but without having to delve into Vega-Lite specs (unless you're doing something tricky), and without having to melt your DataFrame from long format to wide format (the bane of most Vega-Lite plots!)
For example, let's say you have a "long-format" table like this:
| time | stock_name | stock_value |
|---|---|---|
| ... | stock1 | 1 |
| ... | stock2 | 2 |
| ... | stock1 | 100 |
| ... | stock2 | 200 |
Then you can draw a line chart by simply calling line_chart() with some
column names:
import plost
plost.line_chart(
my_dataframe,
x='time', # The name of the column to use for the x axis.
y='stock_value', # The name of the column to use for the data itself.
color='stock_name', # The name of the column to use for the line colors.
)
Simple enough! But what if you instead have a "wide-format" table like this, which is super common in reality:
| time | stock1 | stock2 |
|---|---|---|
| ... | 1 | 100 |
| ... | 2 | 200 |
Normally you'd have to melt() the table with Pandas first or create a complex
Vega-Lite layered plot. But with Plost, you can just specify what you're trying
to accomplish and it will melt the data internally for you:
import plost
plost.line_chart(
my_dataframe,
x='time',
y=('stock1', 'stock2'), # 👈 This is magic!
)
Ok, now let's add a mini-map to make panning/zooming even easier:
import plost
plost.line_chart(
my_dataframe,
x='time',
y=('stock1', 'stock2'),
pan_zoom='minimap', # 👈 This is magic!
)
But we're just scratching the surface. Basically the idea is that Plost allows you to make beautiful Vega-Lite-driven charts for your most common needs, without having to learn about the powerful yet complex language behind Vega-Lite.
Check out the the sample app / docs for a taste of other amazing things you can do!
Juicy examples
Check out the documentation app!
Documentation
This is in the documentation app too!
Metadata
Release files for Plost 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Plost-0.2.5.tar.gz | 12.1 kB | Without provenance | Details for Plost-0.2.5.tar.gz |
Release files / Plost-0.2.5.tar.gz
| Download URL | Plost-0.2.5.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19c33cb0bb2f03bb00d9b106c1a5e413d0b368001669ebdf11d64b1491a67bfb
|
|
BLAKE2b-256 checksum How to use checksums |
1ed2b5eb51b5c1e267de49bee5edd0062e1f6c38079daf486bbeb77137a38aa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for Plost 0.2.5
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.