Skip to main content

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:

an example tuftelike plot.

Project details


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)

Uploaded Source

Built Distribution

matplotlib_tufte-1.1.1-py3-none-any.whl (17.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page