Utility package that takes care of configuring Matplotlib for publication-ready figures!
pip install pltpublishBefore 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 |
|---|---|
![]() |
![]() |
If you are using LaTeX then perhaps TikzPlotLib will be highly relevant.
setupcalls allsetup_*methodssetup_colorblindconfigures matplotlib to use a colorblind palettesetup_latex_fontsconfigures matplotlib to use LaTeX fontsset_size_pixelsenables to set the size of an existing figure in pixelssave_figacts likepyplot.savefigbut guarantees that the grid is on and removes outer white space and also enables to scale up or down the figure before savingextract_legend_as_figureextracts the legend of your figure and plots it on another new figurelayout_for_subplotsfinds automatically a good layout given the number of plots you have to plot on the same figureget_color_cyclegets you the current default color cycleset_color_cyclesets the current default color cycle

