Tufte-style plots for matplotlib
Project description
matplotlib-tufte
matplotlib-tufte is a python module to create Tufte-like plots with matplotlib.
Inspiration is drawn from Edward Tufte: The Visual Display of Quantitative Information.
Requirements
- python >= 3.7
- matplotlib
Examples
See examples/Basic.ipynb for some small examples of tuftelike plots.
Usage
Create your plots with matplotlib as usual.
Then, run tuftelike.adjust
with the x- and y-values of your plot to adjust it in-place.
import matplotlib.pyplot as plt
import tuftelike
xs, ys = [1, 2, 3, 4], [1, 4, 2, 3]
plt.plot(xs, ys)
tuftelike.adjust(xs, ys)
plt.savefig("example.png")
Tuftelike needs the x- and y-values because matplotlib does not store these internally. The above code produces:
.
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
File details
Details for the file matplotlib_tufte-1.1.dev0.tar.gz
.
File metadata
- Download URL: matplotlib_tufte-1.1.dev0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.7.17 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57d96bc20360082bee36139ec9444c8a927169ec607606002e399f8696ba3c61 |
|
MD5 | 97380d95f60c29ef19213a8177dd5704 |
|
BLAKE2b-256 | 065e3193908225c21b01e0fb01395399cc7143a95c1032703f93f17872b7f643 |
File details
Details for the file matplotlib_tufte-1.1.dev0-py3-none-any.whl
.
File metadata
- Download URL: matplotlib_tufte-1.1.dev0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.7.17 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 955a5809e992d2e2a33dbf286479b6e9bd420c3db971d8e133fb3455256dc1f2 |
|
MD5 | a7b7b9ffd4e5b16e18e364b6bbe9dd8c |
|
BLAKE2b-256 | 38d54905bd412ec8c870aca63a12a44dc455280aad3f26c677446497ef2fcbb9 |