Skip to content

Commit

Permalink
Improved README
Browse files Browse the repository at this point in the history
  • Loading branch information
Theomat committed Feb 6, 2022
1 parent 58cc368 commit 9e67990
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# 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 > # your plot code
# your plot code using plt > # your plot code using plt
plt.savefig("my_fig.eps") > pub.save_fig("my_fig.eps")
```

Expand All @@ -22,6 +25,6 @@ plt.savefig("my_fig.eps") > pub.save_fig("my_fig.eps")
- `setup` calls all `setup_*` methods
- `setup_colorblind` configures matplotlib to use a colorblind palette
- `setup_latex_fonts` configures matplotlib to use LaTeX fonts
- `save_fig` acts like `pyplot.save_fig` but guarantees a minimum dpi, that the grid is on and removes outer white space
- `save_fig` acts like `pyplot.savefig` but guarantees a minimum dpi, that the grid is on and removes outer white space
- `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

0 comments on commit 9e67990

Please sign in to comment.