skip to navigation
skip to content

Not Logged In

savefig 0.0.1

Save matplotlib figures with embedded metadata for reproducibility and profit

Latest Version: 0.0.2

Remember that time where you tried to remake a figure for your paper and couldn’t seem to get the same results? We’ve all been there. Well not anymore!

This module monkey patches the savefig command from matplotlib and inserts your current git commit hash into the metadata of the saved file. Currently it supports PNG and PDF figures.

Usage

First, install the module from PyPI:

pip install savefig

or from source:

git clone https://github.com/dfm/savefig.git
cd savefig
python setup.py install

Then in all your code just add the following lines before importing matplotlib:

from savefig import monkey_patch
monkey_patch()

To read the metadata from an existing image file, run:

python -m savefig /path/to/figure.png

License

Copyright 2014 Dan Foreman-Mackey

Available under the MIT License.

 
File Type Py Version Uploaded on Size
savefig-0.0.1.tar.gz (md5) Source 2014-03-30 3KB
  • Downloads (All Versions):
  • 5 downloads in the last day
  • 25 downloads in the last week
  • 137 downloads in the last month