Skip to main content

Extensions to Matplotlib and Seaborn plotting for Visium SA.

Project description

visplotlib

flake8 Actions Status PyPI version

Standardized plot styling for Visium SA

Installation

To plot with visplotlib, you need to install the library into your environment:

pip install visplotlib

You can then use the following import statements:

import visplotlib as vpl
from visplotlib.pyplot import mpl, plt  # <-- Wrapped Matplotlib and Pyplot
from visplotlib.seaborn import sns  # <-- Wrapped Seaborn
from visplotlib_test.plotly import go, px # <-- Wrapped Plotly

Example

We want to make your plots beautiful. We don't want to change your coding practices with long and annoying procedures.

All you need to do is call plt.format()(for matplotlib and seaborn) when making a plot. That's it.

fig, ax = plt.subplots()

iris = sns.load_dataset('iris')

sns.scatterplot(data=iris, x='sepal_length', y='petal_length', ax=ax)
ax.set_title('Sepal vs. Petal length')

plt.format()  # All we need to do is call plt.format()!
plt.show()

or plotly.format()(for plotly)

df = px.data.iris()
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species", title="A Plotly Express Figure")

plotly.format(fig)  # All we need to do is call plt.format()!
fig.show()

Loom demonstration

https://user-images.githubusercontent.com/32436482/124758979-6c65cd00-df2f-11eb-8b3e-fc156d441913.mp4

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

visplotlib_test-1.3.1.tar.gz (7.0 kB view details)

Uploaded Source

File details

Details for the file visplotlib_test-1.3.1.tar.gz.

File metadata

  • Download URL: visplotlib_test-1.3.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for visplotlib_test-1.3.1.tar.gz
Algorithm Hash digest
SHA256 fbc59def1966473dcfb14c7577b31e344540250ffd7c236f5bb98062acf26fc0
MD5 158f655c4239963f1f705d158f2897b4
BLAKE2b-256 ca9b62bbfaa487ec59521d8735a0db9248b2b2061fc37aa14833360fc366b37c

See more details on using hashes here.

Supported by

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