Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Helper functions and context manager to make it easier to save matplotlib plots as images.

Project description

Intro

A library of functions (just one at the moment) to streamline the saving and exporting of matplotlib plots as images and whatnot.

I wrote it because I was spending a lot of time creating and saving plots in another project of mine and wanted to automate it.

Usage

from matplotsave import pltsave

xs = list(range(10))
ys = [i**2 for i in xs]
with pltsave("myplot.png") as (fig,ax):
    ax.plot(xs,ys)

This will export the plot to myplot.png painlessly after you are given the chance to actually plot some data.

Because the pltsave context manager returns the fig and ax objects the entire matplotlib api is still accessible.

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 matplotsave, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size matplotsave-0.1.3.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page