Skip to main content

Deprecation

dufte as a stand-alone module has been deprecated and merged into mplx.


dufte-logo

Da kiekste, wa?

PyPi Version Anaconda Cloud PyPI pyversions GitHub stars Downloads

gh-actions codecov LGTM Code style: black

This package creates clean and beautiful plots that work on light and dark backgrounds. Inspired by the work of Edward Tufte.

To use, install with

pip install dufte

and simply select the dufte style:

import dufte
import matplotlib.pyplot as plt

# global setting:
plt.style.use(dufte.style)

# with a context manager:
with plt.style.context(dufte.style_bar):
    # ...
    pass

Check out dufte.legend(), dufte.ylabel(), and dufte.show_bar_values() for more duftiness.

Comparison with default Matplotlib

See here for how to create the below plots.

matplotlib dufte with dufte.legend()
matplotlib dufte dufte with dufte.show_bar_values()

Further reading and other styles

Other styles

Projects using dufte:

Background

xdoc

The position $x_i$ of the line annotations is computed as the solution of a non-negative least-squares problem

\begin{align}
\frac{1}{2}\sum_i (x_i - t_i)^2 \to \min_x,\\
(x_i - x_j)^2 \ge a^2 \quad \forall i,j.
\end{align}

where $a$ is the minimum distance between two entries and $t_i$ is the target position.

Metadata

Release files for dufte 0.2.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dufte 0.2.29
File Size Uploaded
dufte-0.2.29.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dufte 0.2.29
File Interpreter ABI Platform
dufte-0.2.29-py3-none-any.whl Python 3 none any Details

Total release size: 18.3 kB

Release files / dufte-0.2.29.tar.gz

Download URL dufte-0.2.29.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9177a09fb27d46fe5b1390825c9347ecddb5176b4fa69614ce0d83499c200689
BLAKE2b-256 checksum
How to use checksums
3fdc81f41060445a319f24c9771e66b8a935fb435b1ca13fecf8cb4b9310a39f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release files / dufte-0.2.29-py3-none-any.whl

Download URL dufte-0.2.29-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c16741c70acd681685df7091af0bffcded33257e866619738d7d13fee049bed
BLAKE2b-256 checksum
How to use checksums
28cd55dae0584e0862688f484cbd6e27ea9ed33fc7ffcc2dc5d0524557c1aad6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.2.29 This release

2 release files

0.2.28

2 release files

0.2.27

2 release files

0.2.26

2 release files

0.2.25

2 release files

0.2.24

2 release files

0.2.22

2 release files

0.2.21

2 release files

0.2.16

2 release files

0.2.12

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page