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
matplotlib_tufte-1.1.1.tar.gz
(8.4 kB
view hashes)
Built Distribution
Close
Hashes for matplotlib_tufte-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e16a9aae52659ebd72d7505285a67feca0f8e321e07184787f95dc86f1e63d6 |
|
MD5 | c5257ef4d37ccf47661271685309c346 |
|
BLAKE2b-256 | 4b7c9eeb92d81ef963eb354a75f03bb31228f5fe5d990bda946f62ebcaec790b |