Python port of the R patchwork package
Project description
patchwork-python
Python port of the R patchwork package.
patchwork lets you compose multiple ggplot figures into a single layout
using arithmetic-style operators — same idea here, same operators, on top of
ggplot2-python:
import patchwork # installs the | / + - dunders on GGPlot
from ggplot2_py import ggplot, aes, geom_point
p1 = ggplot(df) + geom_point(aes("x", "y"))
p2 = ggplot(df) + geom_point(aes("x", "z"))
p1 | p2 # side-by-side
p1 / p2 # stacked
(p1 | p2) / p3 # nested
Where it fits in the Bio-Babel R-port stack
patchwork-python <-- this repo: composing ggplots
|
+-- ggplot2-python grammar of graphics
+-- rgrid-python viewport / unit / Cairo backend
+-- gtable-python layout-aware grob tables
+-- scales-python scale transformations
+-- great_tables (optional) backend for wrap_table()
Install
pip install patchwork-python
pip install "patchwork-python[tables]" # adds great_tables for wrap_table()
Documentation
Tutorials are mirrored to docs/tutorials/ and rendered via mkdocs:
pip install -e ".[docs]"
mkdocs serve
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file patchwork_python-1.3.2.9000.tar.gz.
File metadata
- Download URL: patchwork_python-1.3.2.9000.tar.gz
- Upload date:
- Size: 3.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
526502c37db8b05046b6ac31533b4a05950dab9c1a89b37fa4d24d2138ebb93d
|
|
| MD5 |
28c4ec9caab9d4b2bf45d59c6f8c979b
|
|
| BLAKE2b-256 |
cab81f4195e6ef020bc1a1bd321ea917b9a2090c5990cc3fb674614479acd5ec
|
File details
Details for the file patchwork_python-1.3.2.9000-py3-none-any.whl.
File metadata
- Download URL: patchwork_python-1.3.2.9000-py3-none-any.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e73df3672f06eaedefbdb21b417b37b7336f7cbc7f3ff558a39a88aad81ec1d
|
|
| MD5 |
7b210975d30944a18653dd2f21aa2c15
|
|
| BLAKE2b-256 |
95773a59007754a1bc13248873122dae713981b0471828f02c45db0e5340cc93
|