Skip to main content

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.

Release files for plotnine-prism 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plotnine-prism 0.1.0
File Size Uploaded
plotnine-prism-0.1.0.tar.gz 26.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plotnine-prism 0.1.0
File Interpreter ABI Platform
plotnine_prism-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 68.9 kB

Release files / plotnine-prism-0.1.0.tar.gz

Download URL plotnine-prism-0.1.0.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e45d75556349a30769afd3dee7dedb1db5aaa85af90534f017f5bd1e8f745c0d
BLAKE2b-256 checksum
How to use checksums
254c8c76ff9770de0128299a4d466e6322227cebf9dab78829e71204dd57f7d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1022-azure

Release files / plotnine_prism-0.1.0-py3-none-any.whl

Download URL plotnine_prism-0.1.0-py3-none-any.whl
Size 42.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7724ce2bec85766a0baf6133e566eda29892adc162c453a4e2dd62aceaea7611
BLAKE2b-256 checksum
How to use checksums
2ea663dd024e61743d4332cf4566ebfaa33565d49460e5be3b815c51e23e75d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1022-azure

Release history Release notifications | RSS feed

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page