Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pplotly-0.0.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

pplotly-0.0.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pplotly-0.0.3.tar.gz.

File metadata

  • Download URL: pplotly-0.0.3.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pplotly-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6657861877285f7049b114b52dd5c3ae4d3bf4a0fc89b8b2e8db8e98c815b969
MD5 d66eac29d08a12d498e5f5bfd2db3857
BLAKE2b-256 df4072a23d6bebde444544ea02b3f3c4d188a8e044889b10af36a08b75e94913

See more details on using hashes here.

Provenance

The following attestation bundles were made for pplotly-0.0.3.tar.gz:

Publisher: python-publish.yml on pkalbhor/pplotly

Attestations:

File details

Details for the file pplotly-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pplotly-0.0.3-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

Hashes for pplotly-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2e30a7902038571bc40bf7aebd45889148169301a22fe3a399f62a7591369120
MD5 b354c60520ddfe80353170e392ba90ce
BLAKE2b-256 abc30f275ecfc8f018c1b955550b18bbabd81ae4972dfe4f289b6e59e8030bce

See more details on using hashes here.

Provenance

The following attestation bundles were made for pplotly-0.0.3-py3-none-any.whl:

Publisher: python-publish.yml on pkalbhor/pplotly

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page