Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

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.

Files for wraplot, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size wraplot-0.1.1-py3-none-any.whl (19.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size wraplot-0.1.1.tar.gz (19.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page