Skip to main content

Tools for Matplotlib

Project description

As the name implies, mpltools provides tools for working with matplotlib. For the most part, these tools are only loosely-connected in functionality, so the best way to get started is to look at the example gallery.

Styles

This package got its start by implementing plotting “styles”—essentially stylesheets that are similar to matplotlibrc files. Unfortunately, the syntax for an mplstyle file is slightly different than matplotlibrc files because we use ConfigObj to parse them.

Style names should be specified as sections in a “mplstyle” file. A simple mplstyle file would look like:

[style1]

text.fontsize = 12
figure.dpi = 150

[style2]

text.fontsize = 10
font.family = 'serif'

mpltools searches the current working directory and your home directory for mplstyle files. To use a style, you just add:

>>> from mpltools import style
>>> style.use('style1')

There are a number of pre-defined styles located in mpltools/style/. To list all available styles, use:

>>> print style.available

Documentation

For more details about use and installation, see the mpltools documentation. If you’re short on time, just check out the Getting Started section or the example gallery.

Requirements

Installation from source

mpltools may be installed globally using:

$ git clone git@github.com:tonysyu/mpltools.git
$ cd mpltools
$ python setup.py install

or locally using:

$ python setup.py install --prefix=${HOME}

If you prefer, you can use it without installing, by simply adding this path to your PYTHONPATH variable and compiling the extensions:

$ python setup.py build_ext -i

Licence

New BSD (a.k.a. Modified BSD). See LICENSE in this directory for details.

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

mpltools-0.2.0.tar.gz (27.5 kB view details)

Uploaded Source

File details

Details for the file mpltools-0.2.0.tar.gz.

File metadata

  • Download URL: mpltools-0.2.0.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mpltools-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1b983fa046cb599a11d14d57f14913a473ab0fdda5851209d62bb78bcfd29a1c
MD5 97e222b4649492554e008a077a4183fb
BLAKE2b-256 bd995fe7ba3fb80428ec5efaf1fcf40019b8e8e4821ff62c75eaea0e6161db9e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page