From 95d5ad94e88ad0c711613c7e4985681ffb67223d Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 30 Mar 2026 19:00:18 +0100 Subject: [PATCH 1/8] Remove example of small-caps font --- scripts/fonts.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/scripts/fonts.py b/scripts/fonts.py index 7d39e10..f7475a9 100644 --- a/scripts/fonts.py +++ b/scripts/fonts.py @@ -11,26 +11,10 @@ fig = plt.figure(figsize=(4.25, 3.8)) ax = fig.add_axes([0, 0, 1, 1], frameon=False, xticks=[], yticks=[], - xlim=[0, 40], ylim=[0, 38]) + xlim=[0, 40], ylim=[0, 34]) y = 1 -# ----------------------------------------------------------------------------- -variants = { - "normal" : "../fonts/eb-garamond/EBGaramond08-Regular.otf", - "small-caps" : "../fonts/eb-garamond/EBGaramondSC08-Regular.otf" -} - -text = "The quick brown fox jumps over the lazy dog" -for i, (variant, file) in enumerate(variants.items()): - ax.text(1, y, text, size=9, va="center", font=pathlib.Path(file).resolve()) - - ax.text(39, y, variant, - color="0.25", va="center", ha="right", - size="small", family="Source Code Pro", weight=400) - y += 1.65 -y += 1 - # ----------------------------------------------------------------------------- styles = ["normal", "italic"] From 7bb332ae6df0479dec7eebacf611dda71dc96c39 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 30 Mar 2026 19:01:23 +0100 Subject: [PATCH 2/8] Remove references to EB garamond --- README.md | 1 - fonts/Makefile | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index a9d07d5..8894c05 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,6 @@ Beginner handout [(download pdf)](https://matplotlib.org/cheatsheets/handout-beg or https://github.com/adobe-fonts/source-sans-pro/tree/release/OTF * `fonts/source-serif-pro/*` : See https://fonts.google.com/specimen/Source+Serif+Pro or https://github.com/adobe-fonts/source-serif-pro/tree/release/OTF -* `fonts/eb-garamond/*` : See https://bitbucket.org/georgd/eb-garamond/src/master * `fonts/pacifico/*` : See https://fonts.google.com/download?family=Pacifico On Linux, with `make` installed, the fonts can be set up with the following command: diff --git a/fonts/Makefile b/fonts/Makefile index 96d20ee..69f733f 100644 --- a/fonts/Makefile +++ b/fonts/Makefile @@ -1,6 +1,5 @@ -FONT_DIRS := eb-garamond roboto roboto-mono roboto-slab source-code-pro source-sans-pro source-serif-pro pacifico +FONT_DIRS := roboto roboto-mono roboto-slab source-code-pro source-sans-pro source-serif-pro pacifico -EB_GARAMOND_ZIP := https://bitbucket.org/georgd/eb-garamond/downloads/EBGaramond-0.016.zip ROBOTO_ZIP := https://github.com/googlefonts/roboto/releases/download/v2.138/roboto-unhinted.zip ROBOTO_MONO_ZIP := https://github.com/googlefonts/RobotoMono/archive/8f651634e746da6df6c2c0be73255721d24f2372.zip ROBOTO_SLAB_ZIP := https://github.com/googlefonts/robotoslab/archive/a65e6d00d8e3e7ee2fabef844e58fa12690384d2.zip @@ -18,7 +17,6 @@ default: all .PHONY: all all: sources mkdir -p $(FONT_DIRS) - cd eb-garamond && unzip -j /tmp/eb-garamond.zip "EBGaramond-0.016/otf/*.otf" $(UNZIP_FLAGS) cd roboto && unzip -j /tmp/roboto.zip "*.ttf" $(UNZIP_FLAGS) cd roboto-mono && unzip -j /tmp/roboto-mono.zip "RobotoMono-8f651634e746da6df6c2c0be73255721d24f2372/fonts/ttf/*.ttf" $(UNZIP_FLAGS) cd roboto-slab && unzip -j /tmp/roboto-slab.zip "robotoslab-a65e6d00d8e3e7ee2fabef844e58fa12690384d2/fonts/static/*.ttf" $(UNZIP_FLAGS) @@ -29,7 +27,6 @@ all: sources .PHONY: sources sources: - wget $(EB_GARAMOND_ZIP) -O /tmp/eb-garamond.zip wget $(ROBOTO_ZIP) -O /tmp/roboto.zip wget $(ROBOTO_MONO_ZIP) -O /tmp/roboto-mono.zip wget $(ROBOTO_SLAB_ZIP) -O /tmp/roboto-slab.zip From 03a181c362659f16627608e9d37f62808d1a38e9 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 30 Mar 2026 19:14:55 +0100 Subject: [PATCH 3/8] Update cartopy link --- cheatsheets.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheatsheets.tex b/cheatsheets.tex index 43c2467..6b69fce 100644 --- a/cheatsheets.tex +++ b/cheatsheets.tex @@ -522,7 +522,7 @@ \scale{projection-3d.pdf} {p='3d'\hfill\api{https://matplotlib.org/stable/api/toolkits/mplot3d.html}}{} \plot{projection-cartopy.pdf}{p=ccrs.Orthographic()} - {https://scitools.org.uk/cartopy/docs/latest/reference/projections.html} + {https://cartopy.readthedocs.io/stable/reference/projections.html} {import cartopy.crs as ccrs} {} \end{myboxed} From 50090c77f765fefd83c5e61fca8ebb092fc3f0a1 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 30 Mar 2026 19:19:48 +0100 Subject: [PATCH 4/8] Filter out stackoverflow links too --- check-links.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check-links.py b/check-links.py index aa6f449..f463498 100755 --- a/check-links.py +++ b/check-links.py @@ -11,9 +11,10 @@ status_codes = [pdfx.downloader.get_status_code(ref.ref) for ref in refs] broken_links = [(ref.ref, code) for ref, code in zip(refs, status_codes) if code != 200] +# It seems that Twitter and stackoverflow do not respond well to the link checker and throws a 400 +broken_links = [b for b in broken_links if not ('twitter.com' in b or 'stackoverflow.com' in b)] -# it seems that Twitter does not respond well to the link checker and throws a 400 -if all(['twitter.com' in url for url, _ in broken_links]): +if len(broken_links) == 0: sys.exit(0) else: print('Broken links:', broken_links) From e3315a3d5a3f93577f276bfaac356d6a4c0cad35 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 30 Mar 2026 19:33:12 +0100 Subject: [PATCH 5/8] Fix link filtering --- check-links.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-links.py b/check-links.py index f463498..f5c3f74 100755 --- a/check-links.py +++ b/check-links.py @@ -12,7 +12,7 @@ broken_links = [(ref.ref, code) for ref, code in zip(refs, status_codes) if code != 200] # It seems that Twitter and stackoverflow do not respond well to the link checker and throws a 400 -broken_links = [b for b in broken_links if not ('twitter.com' in b or 'stackoverflow.com' in b)] +broken_links = [b for b in broken_links if not ('twitter.com' in b[0] or 'stackoverflow.com' in b[0])] if len(broken_links) == 0: sys.exit(0) From 8ee0cb0c9d711a4bb9629a9916d379bf4a0b4d19 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 30 Mar 2026 20:23:48 +0100 Subject: [PATCH 6/8] Fix gitter link --- cheatsheets.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheatsheets.tex b/cheatsheets.tex index 6b69fce..f292f4a 100644 --- a/cheatsheets.tex +++ b/cheatsheets.tex @@ -327,7 +327,7 @@ {\faIcon{discourse}\,discourse.matplotlib.org}\\ \href{https://stackoverflow.com/questions/tagged/matplotlib} {\faIcon{stack-overflow}\,stackoverflow.com/questions/tagged/matplotlib}\\ - \href{https://gitter.im/matplotlib/matplotlib} + \href{https://app.gitter.im/#/room/#matplotlib_matplotlib:gitter.im} {\faIcon{gitter}\,{https://gitter.im/matplotlib/matplotlib}}\\ \href{https://twitter.com/matplotlib} {\faIcon{twitter}\,twitter.com/matplotlib}\\ From e788b16f7e61818ff2a60d9ad672ab986cc2307a Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 30 Mar 2026 21:49:57 +0100 Subject: [PATCH 7/8] Remove leading https:// from gitter link text --- cheatsheets.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheatsheets.tex b/cheatsheets.tex index f292f4a..9953b77 100644 --- a/cheatsheets.tex +++ b/cheatsheets.tex @@ -328,7 +328,7 @@ \href{https://stackoverflow.com/questions/tagged/matplotlib} {\faIcon{stack-overflow}\,stackoverflow.com/questions/tagged/matplotlib}\\ \href{https://app.gitter.im/#/room/#matplotlib_matplotlib:gitter.im} - {\faIcon{gitter}\,{https://gitter.im/matplotlib/matplotlib}}\\ + {\faIcon{gitter}\,{gitter.im/matplotlib/matplotlib}}\\ \href{https://twitter.com/matplotlib} {\faIcon{twitter}\,twitter.com/matplotlib}\\ \href{https://mail.python.org/mailman/listinfo/matplotlib-users} From 1cfadae387c575045e60e8a9b95ecfa9a461c719 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 30 Mar 2026 21:58:48 +0100 Subject: [PATCH 8/8] Remove gitter link --- cheatsheets.tex | 2 -- 1 file changed, 2 deletions(-) diff --git a/cheatsheets.tex b/cheatsheets.tex index 9953b77..ff713f7 100644 --- a/cheatsheets.tex +++ b/cheatsheets.tex @@ -327,8 +327,6 @@ {\faIcon{discourse}\,discourse.matplotlib.org}\\ \href{https://stackoverflow.com/questions/tagged/matplotlib} {\faIcon{stack-overflow}\,stackoverflow.com/questions/tagged/matplotlib}\\ - \href{https://app.gitter.im/#/room/#matplotlib_matplotlib:gitter.im} - {\faIcon{gitter}\,{gitter.im/matplotlib/matplotlib}}\\ \href{https://twitter.com/matplotlib} {\faIcon{twitter}\,twitter.com/matplotlib}\\ \href{https://mail.python.org/mailman/listinfo/matplotlib-users}