{"id":13689029,"url":"https://github.com/nschloe/dufte","last_synced_at":"2025-10-21T20:18:39.423Z","repository":{"id":45653212,"uuid":"257003095","full_name":"nschloe/dufte","owner":"nschloe","description":":chart_with_upwards_trend: Minimalistic Matplotlib style","archived":true,"fork":false,"pushed_at":"2021-12-02T12:22:02.000Z","size":2113,"stargazers_count":216,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-06T03:05:44.650Z","etag":null,"topics":["matplotlib","matplotlib-style-sheets","matplotlib-styles","plotting","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nschloe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-19T13:13:53.000Z","updated_at":"2024-09-05T16:46:50.000Z","dependencies_parsed_at":"2022-09-14T08:12:43.739Z","dependency_job_id":null,"html_url":"https://github.com/nschloe/dufte","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nschloe%2Fdufte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nschloe%2Fdufte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nschloe%2Fdufte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nschloe%2Fdufte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nschloe","download_url":"https://codeload.github.com/nschloe/dufte/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224282089,"owners_count":17285769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["matplotlib","matplotlib-style-sheets","matplotlib-styles","plotting","python"],"created_at":"2024-08-02T15:01:31.098Z","updated_at":"2025-10-21T20:18:39.111Z","avatar_url":"https://github.com/nschloe.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Deprecation\n\ndufte as a stand-alone module has been deprecated and merged into [mplx](https://github.com/nschloe/mplx).\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/nschloe/dufte\"\u003e\u003cimg alt=\"dufte-logo\" src=\"https://nschloe.github.io/dufte/logo.svg\" width=\"40%\"\u003e\u003c/a\u003e\n  \u003cp align=\"center\"\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Berlin_German\"\u003eDa kiekste, wa?\u003c/a\u003e\u003c/p\u003e\n\u003c/p\u003e\n\n[![PyPi Version](https://img.shields.io/pypi/v/dufte.svg?style=flat-square)](https://pypi.org/project/dufte/)\n[![Anaconda Cloud](https://anaconda.org/conda-forge/dufte/badges/version.svg?=style=flat-square)](https://anaconda.org/conda-forge/dufte/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/dufte.svg?style=flat-square)](https://pypi.org/project/dufte/)\n[![GitHub stars](https://img.shields.io/github/stars/nschloe/dufte.svg?logo=github\u0026label=Stars\u0026logoColor=white\u0026style=flat-square)](https://github.com/nschloe/dufte)\n[![Downloads](https://pepy.tech/badge/dufte/month?style=flat-square)](https://pepy.tech/project/dufte)\n\u003c!--[![PyPi downloads](https://img.shields.io/pypi/dm/dufte.svg?style=flat-square)](https://pypistats.org/packages/dufte)--\u003e\n\n[![gh-actions](https://img.shields.io/github/workflow/status/nschloe/dufte/ci?style=flat-square)](https://github.com/nschloe/dufte/actions?query=workflow%3Aci)\n[![codecov](https://img.shields.io/codecov/c/github/nschloe/dufte.svg?style=flat-square)](https://codecov.io/gh/nschloe/dufte)\n[![LGTM](https://img.shields.io/lgtm/grade/python/github/nschloe/dufte.svg?style=flat-square)](https://lgtm.com/projects/g/nschloe/dufte)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)\n\nThis package creates clean and beautiful plots that work on light and dark backgrounds.\nInspired by the work of [Edward Tufte](https://en.wikipedia.org/wiki/Edward_Tufte).\n\nTo use, install with\n\n```\npip install dufte\n```\n\nand simply select the `dufte` style:\n\n```python\nimport dufte\nimport matplotlib.pyplot as plt\n\n# global setting:\nplt.style.use(dufte.style)\n\n# with a context manager:\nwith plt.style.context(dufte.style_bar):\n    # ...\n    pass\n```\n\nCheck out `dufte.legend()`, `dufte.ylabel()`, and `dufte.show_bar_values()` for more\nduftiness.\n\n#### Comparison with default Matplotlib\n\nSee [here](tests/create_comparison.py) for how to create the below plots.\n\n\u003ca href=\"tests/create_comparison.py\"\u003e\n\u003ctable width=\"100%\"\u003e\n  \u003ctr\u003e\n  \u003ctd width=\"50%\"\u003e\u003cimg src=\"https://nschloe.github.io/dufte/ex1-mpl.svg\"/\u003e\u003c/td\u003e\n  \u003ctd width=\"50%\"\u003e\u003cimg src=\"https://nschloe.github.io/dufte/ex1-dufte.svg\"/\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ematplotlib\u003c/td\u003e\n    \u003ctd\u003edufte with \u003ccode\u003edufte.legend()\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\u003c/a\u003e\n\n\u003ca href=\"tests/create_comparison.py\"\u003e\n\u003ctable width=\"100%\"\u003e\n  \u003ctr\u003e\n  \u003ctd width=\"33%\"\u003e\u003cimg src=\"https://nschloe.github.io/dufte/bars-mpl.svg\"/\u003e\u003c/td\u003e\n  \u003ctd width=\"33%\"\u003e\u003cimg src=\"https://nschloe.github.io/dufte/bars-dufte1.svg\"/\u003e\u003c/td\u003e\n  \u003ctd width=\"33%\"\u003e\u003cimg src=\"https://nschloe.github.io/dufte/bars-dufte2.svg\"/\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ematplotlib\u003c/td\u003e\n    \u003ctd\u003edufte\u003c/td\u003e\n    \u003ctd\u003edufte with \u003ccode\u003edufte.show_bar_values()\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\u003c/a\u003e\n\n### Further reading and other styles\n\n- [Remove to improve: data-ink ratio](https://www.darkhorseanalytics.com/blog/data-looks-better-naked)\n\n  \u003cimg src=\"https://nschloe.github.io/dufte/data-ink.webp\" width=\"50%\"/\u003e\n\n- [Remove to improve: Line Graph Edition](https://youtu.be/bDbJBWvonVI)\n- [Show the Data - Maximize the Data Ink Ratio](https://youtu.be/pCp0a5_YIWE)\n- [Randal S. Olson's blog entry](http://www.randalolson.com/2014/06/28/how-to-make-beautiful-data-visualizations-in-python-with-matplotlib/)\n- [prettyplotlib](https://github.com/olgabot/prettyplotlib)\n- [Wikipedia: Chartjunk](https://en.wikipedia.org/wiki/Chartjunk)\n\nOther styles\n\n- [John Garrett, _Science Plots_](https://github.com/garrettj403/SciencePlots)\n- [Dominik Haitz, _Cyberpunk style_](https://github.com/dhaitz/mplcyberpunk)\n- [Dominik Haitz, _Matplotlib stylesheets_](https://github.com/dhaitz/matplotlib-stylesheets)\n- [Carlos da Costa, _The Grand Budapest Hotel_](https://github.com/cako/mpl_grandbudapest)\n- [Danny Antaki, _vaporwave aesthetics_](https://github.com/dantaki/vapeplot)\n- [QuantumBlack Labs, _QuantumBlack_](https://github.com/quantumblacklabs/qbstyles)\n\nProjects using dufte:\n\n- [perfplot](https://github.com/nschloe/perfplot)\n- [stargraph](https://github.com/nschloe/stargraph)\n\n### Background\n\n[![xdoc](https://img.shields.io/badge/Rendered%20with-xdoc-f2eecb?style=flat-square)](https://chrome.google.com/webstore/detail/xdoc/anidddebgkllnnnnjfkmjcaallemhjee)\n\nThe position $`x_i`$ of the line annotations is computed as the solution of a\nnon-negative least-squares problem\n\n```math\n\\begin{align}\n\\frac{1}{2}\\sum_i (x_i - t_i)^2 \\to \\min_x,\\\\\n(x_i - x_j)^2 \\ge a^2 \\quad \\forall i,j.\n\\end{align}\n```\n\nwhere $`a`$ is the minimum distance between two entries and $`t_i`$ is the target\nposition.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnschloe%2Fdufte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnschloe%2Fdufte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnschloe%2Fdufte/lists"}