Metadata-Version: 2.1
Name: pltpublish
Version: 1.0.2
Summary: Utility package that takes care of configuring Matplotlib for publication-ready figures!
Home-page: https://github.com/Theomat/pltpublish
License: MIT
Author: Théo Matricon
Author-email: theomatricon@gmail.com
Requires-Python: >=3.7.1
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: matplotlib (>=3.0)
Project-URL: Repository, https://github.com/Theomat/pltpublish
Description-Content-Type: text/markdown

# pltpublish

This project on [PyPi](https://pypi.org/project/pltpublish/)|[GitHub](https://github.com/Theomat/pltpublish).

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

## Easy to use

**Before**                            **After**

```python
                                                  > 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`**|
|-|-|
| <img src="https://github.com/Theomat/pltpublish/raw/main/examples/images/classic.png" width="400" height="300">|<img src="https://github.com/Theomat/pltpublish/raw/main/examples/images/pltpublish.png" width="400" height="300"> |

## 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

