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
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file mpl_sizes-0.0.1.tar.gz
.
File metadata
- Download URL: mpl_sizes-0.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 780ed9b7ef1e5c78b0cc169d2df63f196aa8fa2c56b0df601ee7af6d94a3d635 |
|
MD5 | 1dc11e19b58501a2cdc77f5f5bff538b |
|
BLAKE2b-256 | 19ae4d46d1e16995c72413e5a44dbb9bc5f6d7381e4a9601344d4de751772245 |
Provenance
File details
Details for the file mpl_sizes-0.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: mpl_sizes-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64c754f80c06a384424a1e88d410c0705f17cf1dc1c795247668eb7dac69d3ba |
|
MD5 | 1d06e04d0c2096a132dd043908a20aee |
|
BLAKE2b-256 | 4e68ac7d301bd53b3b02aacecee23396354071979f2d35ab84d924a023662c52 |