| Name | pltpublish JSON |
| Version |
1.0.3
JSON |
| download |
| home_page | https://github.com/Theomat/pltpublish |
| Summary | Utility package that takes care of configuring Matplotlib for publication-ready figures! |
| upload_time | 2024-08-15 14:13:35 |
| maintainer | None |
| docs_url | None |
| author | Théo Matricon |
| requires_python | >=3.7.1 |
| license | MIT |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# 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!
```bash
pip install pltpublish
```
**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"> |
## Recommendation
If you are using LaTeX then perhaps [TikzPlotLib](https://github.com/nschloe/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
Raw data
{
"_id": null,
"home_page": "https://github.com/Theomat/pltpublish",
"name": "pltpublish",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7.1",
"maintainer_email": null,
"keywords": null,
"author": "Th\u00e9o Matricon",
"author_email": "theomatricon@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b9/c9/d720aa05436f1fed003a1966a2d7d772c313952a9efa84a604d79dc604d9/pltpublish-1.0.3.tar.gz",
"platform": null,
"description": "# pltpublish\n\nThis project on [PyPi](https://pypi.org/project/pltpublish/)|[GitHub](https://github.com/Theomat/pltpublish).\n\nUtility package that takes care of configuring Matplotlib for publication-ready figures!\n\n```bash\npip install pltpublish\n```\n\n**Before**\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003\u2003**After**\n\n```python\n > import pltpublish as pub\n > pub.setup()\n# your plot code using plt > # your plot code using plt\nplt.savefig(\"my_fig.eps\") > pub.save_fig(\"my_fig.eps\")\n```\n\n|**Without `pltpublish`**|**With `pltpublish`**|\n|-|-|\n| <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\"> |\n\n## Recommendation\n\nIf you are using LaTeX then perhaps [TikzPlotLib](https://github.com/nschloe/tikzplotlib) will be highly relevant.\n\n## All Features\n\n- `setup` calls all `setup_*` methods\n- `setup_colorblind` configures matplotlib to use a colorblind palette\n- `setup_latex_fonts` configures matplotlib to use LaTeX fonts\n- `set_size_pixels` enables to set the size of an existing figure in pixels\n- `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\n- `extract_legend_as_figure` extracts the legend of your figure and plots it on another new figure\n- `layout_for_subplots` finds automatically a good layout given the number of plots you have to plot on the same figure\n- `get_color_cycle` gets you the current default color cycle\n- `set_color_cycle` sets the current default color cycle\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Utility package that takes care of configuring Matplotlib for publication-ready figures!",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://github.com/Theomat/pltpublish",
"Repository": "https://github.com/Theomat/pltpublish"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "85b3ab60e88b9c42c9fa2d59d22b2a77eaf7fc083a3148fb71ffad87cd314819",
"md5": "9a947275365f032756a08918daa29663",
"sha256": "d06977f57679643c59b1d1a2cec923f823642fab53f5589e02c666cfa6e4a09b"
},
"downloads": -1,
"filename": "pltpublish-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9a947275365f032756a08918daa29663",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7.1",
"size": 5053,
"upload_time": "2024-08-15T14:13:34",
"upload_time_iso_8601": "2024-08-15T14:13:34.158952Z",
"url": "https://files.pythonhosted.org/packages/85/b3/ab60e88b9c42c9fa2d59d22b2a77eaf7fc083a3148fb71ffad87cd314819/pltpublish-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b9c9d720aa05436f1fed003a1966a2d7d772c313952a9efa84a604d79dc604d9",
"md5": "ea257f93a6d355918d7f23bfdb4dbcae",
"sha256": "3eb7dc3f8f87307dbf72b64aa45034de12e28cd6bf29fb8cc67b05d49f9cad5c"
},
"downloads": -1,
"filename": "pltpublish-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "ea257f93a6d355918d7f23bfdb4dbcae",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7.1",
"size": 4195,
"upload_time": "2024-08-15T14:13:35",
"upload_time_iso_8601": "2024-08-15T14:13:35.672280Z",
"url": "https://files.pythonhosted.org/packages/b9/c9/d720aa05436f1fed003a1966a2d7d772c313952a9efa84a604d79dc604d9/pltpublish-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-15 14:13:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Theomat",
"github_project": "pltpublish",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pltpublish"
}