| Name | plotnine-prism JSON |
| Version |
0.3.3
JSON |
| download |
| home_page | None |
| Summary | Prism themes for plotnine, inspired by ggprism |
| upload_time | 2025-08-13 17:34:41 |
| maintainer | None |
| docs_url | None |
| author | pwwang |
| requires_python | <4.0,>=3.9 |
| 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/raw/get_started/
[5]: https://pwwang.github.io/plotnine-prism/raw/ex1-dose/
[6]: https://nbviewer.org/github/pwwang/plotnine-prism/blob/master/examples/README.ipynb
Raw data
{
"_id": null,
"home_page": null,
"name": "plotnine-prism",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "pwwang",
"author_email": "pwwang@pwwang.com",
"download_url": "https://files.pythonhosted.org/packages/40/21/d81d3ce0e9039c87c71d5d280200df38bdd21c460cadf543027432134da5/plotnine_prism-0.3.3.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/raw/get_started/\n[5]: https://pwwang.github.io/plotnine-prism/raw/ex1-dose/\n[6]: https://nbviewer.org/github/pwwang/plotnine-prism/blob/master/examples/README.ipynb\n\n",
"bugtrack_url": null,
"license": "GNU General Public License v2.0",
"summary": "Prism themes for plotnine, inspired by ggprism",
"version": "0.3.3",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b2ac0180dde120daa9210ff0ef62638cc249548a330e1a77d2f99dfcdff66b8f",
"md5": "1681c0af965c21a744ab6b11b4a9dd05",
"sha256": "8e795ff242a0f732b63e35400fff71e1819fbecaddd8bca942e4c3495959dc97"
},
"downloads": -1,
"filename": "plotnine_prism-0.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1681c0af965c21a744ab6b11b4a9dd05",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 42716,
"upload_time": "2025-08-13T17:34:41",
"upload_time_iso_8601": "2025-08-13T17:34:41.002242Z",
"url": "https://files.pythonhosted.org/packages/b2/ac/0180dde120daa9210ff0ef62638cc249548a330e1a77d2f99dfcdff66b8f/plotnine_prism-0.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4021d81d3ce0e9039c87c71d5d280200df38bdd21c460cadf543027432134da5",
"md5": "c8db83bb007058586f76671930c2ad47",
"sha256": "440ec05ed29d0822c84013decc7464899f87e2b5ae04a6c0a1dc63a64934141f"
},
"downloads": -1,
"filename": "plotnine_prism-0.3.3.tar.gz",
"has_sig": false,
"md5_digest": "c8db83bb007058586f76671930c2ad47",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 25922,
"upload_time": "2025-08-13T17:34:41",
"upload_time_iso_8601": "2025-08-13T17:34:41.876665Z",
"url": "https://files.pythonhosted.org/packages/40/21/d81d3ce0e9039c87c71d5d280200df38bdd21c460cadf543027432134da5/plotnine_prism-0.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-13 17:34:41",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "plotnine-prism"
}