Skip to main content

Utility package that takes care of configuring Matplotlib for publication-ready figures!

Project description

pltpublish

This project on PyPi|GitHub.

Utility package that takes care of configuring Matplotlib for publication-ready figures!

pip install pltpublish

Before                            After

                                                  > import pltpublish as pub
                                                  > pub.setup()
# your plot code using plt                        > # your plot code using plt
plt.savefig("my_fig.eps")                         > pub.save_fig("my_fig.eps")
Without pltpublish With pltpublish

Recommendation

If you are using LaTeX then perhaps TikzPlotLib will be highly relevant.

All Features

  • setup calls all setup_* methods
  • setup_colorblind configures matplotlib to use a colorblind palette
  • setup_latex_fonts configures matplotlib to use LaTeX fonts
  • set_size_pixels enables to set the size of an existing figure in pixels
  • save_fig acts like pyplot.savefig but guarantees that the grid is on and removes outer white space and also enables to scale up or down the figure before saving
  • extract_legend_as_figure extracts the legend of your figure and plots it on another new figure
  • layout_for_subplots finds automatically a good layout given the number of plots you have to plot on the same figure
  • get_color_cycle gets you the current default color cycle
  • set_color_cycle sets the current default color cycle

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

pltpublish-1.0.3.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

pltpublish-1.0.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pltpublish-1.0.3.tar.gz.

File metadata

  • Download URL: pltpublish-1.0.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for pltpublish-1.0.3.tar.gz
Algorithm Hash digest
SHA256 3eb7dc3f8f87307dbf72b64aa45034de12e28cd6bf29fb8cc67b05d49f9cad5c
MD5 ea257f93a6d355918d7f23bfdb4dbcae
BLAKE2b-256 b9c9d720aa05436f1fed003a1966a2d7d772c313952a9efa84a604d79dc604d9

See more details on using hashes here.

File details

Details for the file pltpublish-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: pltpublish-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for pltpublish-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d06977f57679643c59b1d1a2cec923f823642fab53f5589e02c666cfa6e4a09b
MD5 9a947275365f032756a08918daa29663
BLAKE2b-256 85b3ab60e88b9c42c9fa2d59d22b2a77eaf7fc083a3148fb71ffad87cd314819

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