Utility package that takes care of configuring Matplotlib for publication-ready figures!
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 |
---|---|
setup
calls allsetup_*
methodssetup_colorblind
configures matplotlib to use a colorblind palettesetup_latex_fonts
configures matplotlib to use LaTeX fontssave_fig
acts likepyplot.savefig
but guarantees a minimum dpi, that the grid is on and removes outer white spaceextract_legend_as_figure
extracts the legend of your figure and plots it on another new figurelayout_for_subplots
finds automatically a good layout given the number of plots you have to plot on the same figure