Skip to main content

A simple python wrapper of matplotlib

Project description

wraplot

A simple pythonic matplotlib wrapper: plot, subplot and animate with ease.

Installation

git clone git@github.com:LucaMoschella/wraplot.git
cd wraplot
poetry install 

Sample usage

Spy

spyplot = Spy()
spyobj = Spy.Object(matrix=dense_matrix > 0.5,
                    axis_visibility='off',
                    markersize=4)
o = spyplot(spyobj)

Imagesc

spyplot = Spy()
spyobj = Spy.Object(matrix=dense_matrix > 0.5,
                    axis_visibility='off',
                    markersize=4)
o = spyplot(spyobj)

PlotCloud

cloudplot = PlotCloud2D()
cloudobj = PlotCloud2D.Object(points=points,
                              axis_visibility='off',
                              xlim=[0, 1],
                              ylim=[0, 1],
                              markersize=500)
o = cloudplot(cloudobj, outfile="sample/cloudplot.png")

Subplotting

subplotter = Subplotter()
o = subplotter(objs=[[spyobj, cloudobj],
                     [imagescobj, spyobj]],
               plot_functions=[[spyplot, cloudplot],
                               [imagescplot, spyplot]],
               outfile="sample/subplot.png")

Animation

animator = Animator()
for i in range(50):
    dense_matrix = dense_matrix @ dense_matrix
    o = imagescplot(Imagesc.Object(matrix=np.random.rand(100, 100).astype(np.float)))
    animator.add_figure(o)
animator.save("sample/video.mp4", fps=15)

Live sample

streamlit run sample/demo

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

wraplot-0.1.1.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

wraplot-0.1.1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file wraplot-0.1.1.tar.gz.

File metadata

  • Download URL: wraplot-0.1.1.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.7.5 Linux/4.19.88-1-MANJARO

File hashes

Hashes for wraplot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 190b6612e732027cb13a447be817b36844970ebad0d260f1c49967c42e72691d
MD5 7570d09cf8fbfc9372c37c00b711bcc4
BLAKE2b-256 e214ee751681ac00ba37713c42c39d0b5a999f2c13507c4a7cc9dcc8551426a1

See more details on using hashes here.

File details

Details for the file wraplot-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: wraplot-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.7.5 Linux/4.19.88-1-MANJARO

File hashes

Hashes for wraplot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1cf9bf813c4f57510bf61cba0cd6c8ce6b2c4c415ea1cc860db8a9ba2f72587e
MD5 f9e2299fddacc6e111e44e0c14976a71
BLAKE2b-256 82337214237b1b810264c1150a91698098dac66e82cbfd38f9ecb5992e64470e

See more details on using hashes here.

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