Skip to main content

Default figure sizes for matplotlib.

Project description

mpl_sizes

A lightweight tool for setting figsize and font sizes in matplotlib, with support for:

  • ICLR
  • ICML
  • NeurIPS
  • Informatics thesis

Installation

git clone git@github.com:BayesWatch/mpl_sizes.git
cd mpl_sizes 
python setup.py install

Usage

In your plotting script:

import matplotlib.pyplot as plt
from mpl_sizes import get_format

formatter = get_format("InfThesis") # options: ICLR, ICML, NeurIPS, InfThesis

fig, ax = plt.subplots(figsize=formatter.text_width_plot())

Formatters have two methods:

  • text_width_plot - for full pagewidth plots (e.g. in double column, this would be a full width plot)
  • line_width_plot - for plots the width of the lines of text

and font size will automatically be set correctly.

A full example is given in example.py.

You can also set aspect ratio to be: "narrow", "normal", "wide", or "equal".

Aspect ratios

You can also set aspect ratio to be: "narrow", "normal", "wide", or "equal".

Equal:

Narrow:

Normal:

Wide:

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

mpl_sizes-0.0.1.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

mpl_sizes-0.0.1-py2.py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 2 Python 3

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