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 hashes)

Uploaded Source

Built Distribution

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

Uploaded 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