Skip to main content

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.

Source Distribution

matplotsave-0.1.3.tar.gz (1.9 kB view details)

Uploaded Source

File details

Details for the file matplotsave-0.1.3.tar.gz.

File metadata

  • Download URL: matplotsave-0.1.3.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for matplotsave-0.1.3.tar.gz
Algorithm Hash digest
SHA256 955cd26962f85a20ebcd90b4a5d497f65383b28f918b092d118aee56c5006aba
MD5 3db441de26559526bae8b0e0b007866b
BLAKE2b-256 f4000e69f1601853cc4a972d75b6684b95ac618c1ae31dc266a8419a3844a0d1

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