Name | plotnine-prism JSON |
Version |
0.3.0
JSON |
| download |
home_page | |
Summary | Prism themes for plotnine, inspired by ggprism |
upload_time | 2023-06-27 07:11:45 |
maintainer | |
docs_url | None |
author | pwwang |
requires_python | >=3.8,<4.0 |
license | GNU General Public License v2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# plotnine-prism
Prism themes for [plotnine][1], inspired by [ggprism][2].
## Installation
```
pip install -U plotnine-prism
```
## Documentation
[https://pwwang.github.io/plotnine-prism][3]
## Usage
See [this notebook][6] for the following example, and also [Getting started][4] for a quick overview of `plotnine_prism` features.
```python
from plotnine import *
from plotnine_prism import *
from datar.all import f, as_categorical, mutate
from datar.datasets import ToothGrowth
ToothGrowth >>= mutate(dose=as_categorical(f.dose))
base = (
ggplot(ToothGrowth, aes(x = "dose", y = "len")) +
geom_violin(aes(colour = "dose", fill = "dose"), trim = False) +
geom_boxplot(aes(fill = "dose"), width = 0.2, colour = "black")
)
p1 = base + ylim(-5, 40)
p2 = (
base +
scale_y_continuous(limits=[-5, 40], guide=guide_prism_offset_minor()) +
scale_color_prism('floral') +
scale_fill_prism('floral') +
theme_prism()
)
# See examples/nb_helpers.py for plot_grid function
# plot_grid(p1, p2)
```
<table>
<tr>
<td valign="top"><img src="./toothgrowth1.png" /></td>
<td valign="top"><img src="./toothgrowth2.png" /></td>
</tr>
</table>
## More examples
The Dose Response Curve was recreated. See [this vignette][5] for the source code and step-by-step instructions.
<table>
<tr>
<td valign="top"><img src="./dose1.png" /></td>
<td valign="top"><img src="./dose2.png" /></td>
</tr>
</table>
[1]: https://github.com/has2k1/plotnine
[2]: https://github.com/csdaw/ggprism/
[3]: https://pwwang.github.io/plotnine-prism
[4]: https://pwwang.github.io/plotnine-prism/get_started
[5]: https://pwwang.github.io/plotnine-prism/raw/ex1-dose
[6]: https://pwwang.github.io/plotnine-prism/raw/README
Raw data
{
"_id": null,
"home_page": "",
"name": "plotnine-prism",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "pwwang",
"author_email": "pwwang@pwwang.com",
"download_url": "https://files.pythonhosted.org/packages/04/74/24aa483ea86581e9bb34e1a294f24a0e109839e22eac33f07ad361c9c260/plotnine_prism-0.3.0.tar.gz",
"platform": null,
"description": "# plotnine-prism\n\nPrism themes for [plotnine][1], inspired by [ggprism][2].\n\n\n## Installation\n\n```\npip install -U plotnine-prism\n```\n\n## Documentation\n\n[https://pwwang.github.io/plotnine-prism][3]\n\n## Usage\n\nSee [this notebook][6] for the following example, and also [Getting started][4] for a quick overview of `plotnine_prism` features.\n\n```python\nfrom plotnine import *\nfrom plotnine_prism import *\n\nfrom datar.all import f, as_categorical, mutate\nfrom datar.datasets import ToothGrowth\n\nToothGrowth >>= mutate(dose=as_categorical(f.dose))\n\nbase = (\n ggplot(ToothGrowth, aes(x = \"dose\", y = \"len\")) +\n geom_violin(aes(colour = \"dose\", fill = \"dose\"), trim = False) +\n geom_boxplot(aes(fill = \"dose\"), width = 0.2, colour = \"black\")\n)\n\np1 = base + ylim(-5, 40)\np2 = (\n base +\n scale_y_continuous(limits=[-5, 40], guide=guide_prism_offset_minor()) +\n scale_color_prism('floral') +\n scale_fill_prism('floral') +\n theme_prism()\n)\n# See examples/nb_helpers.py for plot_grid function\n# plot_grid(p1, p2)\n```\n\n<table>\n <tr>\n <td valign=\"top\"><img src=\"./toothgrowth1.png\" /></td>\n <td valign=\"top\"><img src=\"./toothgrowth2.png\" /></td>\n </tr>\n</table>\n\n## More examples\n\nThe Dose Response Curve was recreated. See [this vignette][5] for the source code and step-by-step instructions.\n\n\n<table>\n <tr>\n <td valign=\"top\"><img src=\"./dose1.png\" /></td>\n <td valign=\"top\"><img src=\"./dose2.png\" /></td>\n </tr>\n</table>\n\n[1]: https://github.com/has2k1/plotnine\n[2]: https://github.com/csdaw/ggprism/\n[3]: https://pwwang.github.io/plotnine-prism\n[4]: https://pwwang.github.io/plotnine-prism/get_started\n[5]: https://pwwang.github.io/plotnine-prism/raw/ex1-dose\n[6]: https://pwwang.github.io/plotnine-prism/raw/README\n\n",
"bugtrack_url": null,
"license": "GNU General Public License v2.0",
"summary": "Prism themes for plotnine, inspired by ggprism",
"version": "0.3.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "24dc1c6e669eaa866389b58f969eeb58301c1ca6545252b7302ebea24d11c329",
"md5": "041b410baa25d245ffc7da484a464993",
"sha256": "f7a6e1e0acce7a98377b0707b862be6330e962234f9df37bab8cb926934ccc1f"
},
"downloads": -1,
"filename": "plotnine_prism-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "041b410baa25d245ffc7da484a464993",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 42682,
"upload_time": "2023-06-27T07:11:43",
"upload_time_iso_8601": "2023-06-27T07:11:43.219455Z",
"url": "https://files.pythonhosted.org/packages/24/dc/1c6e669eaa866389b58f969eeb58301c1ca6545252b7302ebea24d11c329/plotnine_prism-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "047424aa483ea86581e9bb34e1a294f24a0e109839e22eac33f07ad361c9c260",
"md5": "d29afbd476d588cd8487169a4577566d",
"sha256": "d2bafacc232ed41494d76b690611243afedb81ae24c0b06e9a20a61187a3e860"
},
"downloads": -1,
"filename": "plotnine_prism-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "d29afbd476d588cd8487169a4577566d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 26789,
"upload_time": "2023-06-27T07:11:45",
"upload_time_iso_8601": "2023-06-27T07:11:45.015147Z",
"url": "https://files.pythonhosted.org/packages/04/74/24aa483ea86581e9bb34e1a294f24a0e109839e22eac33f07ad361c9c260/plotnine_prism-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-27 07:11:45",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "plotnine-prism"
}