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
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
wraplot-0.1.1.tar.gz
(19.1 kB
view hashes)
Built Distribution
wraplot-0.1.1-py3-none-any.whl
(19.2 kB
view hashes)