Prism themes for plotnine, inspired by ggprism
Project description
plotnine-prism
Prism themes for plotnine, inspired by ggprism.
Installation
pip install -U plotnine-prism
Documentation
https://pwwang.github.io/plotnine-prism
Usage
See this notebook for the following example, and also Getting started for a quick overview of plotnine_prism
features.
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)
More examples
The Dose Response Curve was recreated. See this vignette for the source code and step-by-step instructions.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
plotnine-prism-0.1.0.tar.gz
(26.7 kB
view hashes)
Built Distribution
Close
Hashes for plotnine_prism-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7724ce2bec85766a0baf6133e566eda29892adc162c453a4e2dd62aceaea7611 |
|
MD5 | ce2a2fcdde4a3bafd247f0aa254dec5e |
|
BLAKE2b-256 | 2ea663dd024e61743d4332cf4566ebfaa33565d49460e5be3b815c51e23e75d7 |