myplotspec

Introduction

MYPlotSpec is a Python package used to write matplotlib-based plotting tools that support powerful configuration options using the simple text format YAML.

The goal of MYPlotSpec is to make it possible to modify plot settings such as proportions, ticks, colors, or fonts with per-figure, per-subplot, and per-dataset specificity without needing to modify Python code or implement support for individual settings. MYPlotSpec accomplishes this by parsing arguments provided in YAML format and routing them to matplotlib’s existing formatting functions. MYPlotSpec should have no conflict with existing matplotlibrc settings, instead offering a level of specific control on top of them. MyPlotSpec supports a system of defaults and presets that make it easy to prepare multiple versions of plots without modifying code, such as for a lab notebook, printout, or presentation.

Sample applications of MYPlotSpec for plotting several types of data are available on GitHub:

Dependencies

MYPlotSpec supports Python 2.7 and 3.4, and requires the following packages:

  • matplotlib
  • numpy
  • six
  • yaml

MYPlotSpec has been tested with Anaconda python 2.2.0 on Arch Linux, OSX Yosemite, and Windows 8.1.

Installation

Put in your $PYTHONPATH:

export PYTHONPATH=/path/to/my/python/modules:$PYTHONPATH

where /path/to/my/python/modules contains myplotspec.

Authorship

MYPlotSpec is developed by Karl T. Debiec, a graduate student at the University of Pittsburgh advised by Professors Lillian T. Chong and Angela M. Gronenborn.

License

Released under a 3-clause BSD license.

Copyright (c) 2015-2016, Karl T. Debiec, Lillian T. Chong, and Angela M. Gronenborn

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name MYPlotSpec nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Index

Index