Lazy on demand subplots.
Project description
Oekaki
Lazy on demand subplots.
Features
- 1️⃣ You can draw subplots, wherever and whenever you want.
- 2️⃣ You can access mosaic subplots with Regex.
- 3️⃣ Oekaki warn about potentially misleading graphs. (No labels or units.) This feature can be ignored.
- 🍣 (Oekaki imports
japanize-matplotlibif it's installed.)
Demo
import numpy as np
import oekaki
# 1️⃣: lazy draw subplots
fig = oekaki.figure(tight_layout=True)
# 2️⃣: able to use regex search
fig["left"].set(facecolor="black")
fig["upper"].grid(True)
# 🍣 japanize
fig["lower right"].set(aspect="equal", title="俺流 matplotlib")
theta = np.linspace(0, np.pi, 300)
r = np.abs(np.tan(theta))**(1 / np.abs(np.tan(theta)))
fig["lower right"].fill(r * np.cos(theta), r * np.sin(theta), color="#2ce62c")
fig.show("""upper left | upper right
lower left | lower right""")
3️⃣: This code raises the following warnings.
example/readme.py:12: MisleadingWarning:
lower right: No x-label.
lower right: No y-label.
fig.show("""upper left | upper right
Requirement
Installation
pip install oekaki
If you want to also install japanize-matplotlib, run below.
pip install "oekaki[ja]"
Usage
First, create a figure instance.
fig = oekaki.figure()
You can use all matplotlib's Axes API.
fig["plot"].plot(x, y)
You can also use some seaborn API through sns property. They must have ax argument.
fig["hist"].sns.histplot(data=data)
It is also possible to manipulate the subplots using regex. (This is implemented using re.Pattern.search.)
# `.*` means ALL
fig[".*"].grid(True)
Finally, let's draw it in (enhanced) Mosaic format!
fig.show("""hist | plot""")
fig.show("""hist
plot""")
Note
Under construction.
Author
Under construction.
License
Under construction.
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 oekaki-0.1.0.tar.gz.
File metadata
- Download URL: oekaki-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38ec9f7e41fb07757f8b25456ee68542686f2f476022f45fb2c6328e6062b44a
|
|
| MD5 |
71f83e32105d8991f8fec91bbedfe195
|
|
| BLAKE2b-256 |
1982ad60a420dc5ada0cb89701aad1bd89a4a8a174abac171484739f54f73b05
|
File details
Details for the file oekaki-0.1.0-py3-none-any.whl.
File metadata
- Download URL: oekaki-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14e2c29fffd15689638de8496d480b6a2f971ccd683981dc741fd853bb832bcd
|
|
| MD5 |
6a586146664f0a242a6d5373d3c5b23e
|
|
| BLAKE2b-256 |
8e3bd37c1779a7fe1193bbf536a72f57fd992186c3c05ead1bdbc5dffdc1a070
|