Wrapper project of plotly.py, extra functionalities for scientific plots
Project description
PPlotly.py
It is a wrapper around plotly.py
. Graph styles and functionalities are added to get scientific plots.
Quickstart
pip install pplotly
import pplotly as pp
fig = pp.Figure()
fig = fig.add_trace(pp.Scatter(x=["a", "b", "c"], y=[1, 3, 2]))
fig.show()
All the plotly
functionalities are available to use under pplotly.plotly
Examples
Error plot
import pplotly as pp
import numpy as np
fig = pp.make_errorplot(
xaxis_title="X-Title",
yaxis1_title="Y-Title [Unit]",
yaxis2_title="Error [Unit]"
)
x_data = [1, 2, 3]
y1_data = [2.1, 2.2, 3.1]
y2_data = [2.15, 2.21, 3.05]
fig.add_trace(
pp.Scatter(x=x_data, y=y1_data, name="Plot 1")
)
fig.add_trace(
pp.Scatter(x=x_data, y=y2_data, name="Plot 2")
)
error = [abs(p2-p1) for p1, p2 in zip(y1_data, y2_data)]
rmse = np.sqrt(np.mean(np.array(error)**2))
fig.add_trace(pp.Scatter(x=x_data, y=error, name=f"Abs Error: RMSE = {round(rmse, 3)}"), row=2, col=1)
fig.show()
Developer options
git clone
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pre-commit install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pplotly-0.0.1.tar.gz
.
File metadata
- Download URL: pplotly-0.0.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 843c6238bcd6d869b67f734b009c78c3977b8ad4aba8262719e6590ab1097a67 |
|
MD5 | 8e8c58d59b7d4c5771084c0a083b0c22 |
|
BLAKE2b-256 | 96d5a46bbc67ce9101c075710d7e2dcec03d5cd87c695f7bb566d24198e57118 |
Provenance
The following attestation bundles were made for pplotly-0.0.1.tar.gz
:
Publisher:
python-publish.yml
on pkalbhor/pplotly
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pplotly-0.0.1.tar.gz
- Subject digest:
843c6238bcd6d869b67f734b009c78c3977b8ad4aba8262719e6590ab1097a67
- Sigstore transparency entry: 151205368
- Sigstore integration time:
- Predicate type:
File details
Details for the file pplotly-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pplotly-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 441db039ba59bd611e09e43d856bb5bd7196a8450a6cfd0b782e722c746dc0ce |
|
MD5 | 96c7b42a01a9b4c8f97a1072d8a09e45 |
|
BLAKE2b-256 | 5b81b5f2f93ee6124643d73343c590a848eb2fd43d8481c36db59e1822563b94 |
Provenance
The following attestation bundles were made for pplotly-0.0.1-py3-none-any.whl
:
Publisher:
python-publish.yml
on pkalbhor/pplotly
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pplotly-0.0.1-py3-none-any.whl
- Subject digest:
441db039ba59bd611e09e43d856bb5bd7196a8450a6cfd0b782e722c746dc0ce
- Sigstore transparency entry: 151205369
- Sigstore integration time:
- Predicate type: