From cb11f27c33d755d7dfbafe091f34a81a81109502 Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Thu, 21 Jul 2016 15:26:32 -0400 Subject: [PATCH 1/3] Add xkcd font as one of the options The official xkcd font https://github.com/ipython/xkcd-font was missing from the list of what is looked for when the user selects xkcd mode. Since it is the "official" font, it has been added to the top of the list. --- lib/matplotlib/pyplot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index 2f57dd7e11e4..02056a030427 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -399,7 +399,7 @@ def xkcd(scale=1, length=100, randomness=2): from matplotlib import patheffects context = rc_context() try: - rcParams['font.family'] = ['Humor Sans', 'Comic Sans MS'] + rcParams['font.family'] = ['xkcd', 'Humor Sans', 'Comic Sans MS'] rcParams['font.size'] = 14.0 rcParams['path.sketch'] = (scale, length, randomness) rcParams['path.effects'] = [ From 62178aabc364f2bc148af249f9d858c1d423a134 Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Fri, 22 Jul 2016 08:29:26 -0400 Subject: [PATCH 2/3] Add xkcd font as an option for font.fantasy --- lib/matplotlib/rcsetup.py | 2 +- matplotlibrc.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/rcsetup.py b/lib/matplotlib/rcsetup.py index 2c39f69770b1..a8af8f49611b 100644 --- a/lib/matplotlib/rcsetup.py +++ b/lib/matplotlib/rcsetup.py @@ -1000,7 +1000,7 @@ def validate_animation_writer_path(p): 'Sand', 'Script MT', 'Felipa', 'cursive'], validate_stringlist], 'font.fantasy': [['Comic Sans MS', 'Chicago', 'Charcoal', 'Impact' - 'Western', 'Humor Sans', 'fantasy'], + 'Western', 'Humor Sans', 'fantasy, xkcd'], validate_stringlist], 'font.monospace': [['DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Computer Modern Typewriter', diff --git a/matplotlibrc.template b/matplotlibrc.template index 33c19496f546..9b96f90cbcee 100644 --- a/matplotlibrc.template +++ b/matplotlibrc.template @@ -206,7 +206,7 @@ backend : $TEMPLATE_BACKEND #font.serif : DejaVu Serif, Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif #font.sans-serif : DejaVu Sans, Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif #font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, cursive -#font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, Humor Sans, fantasy +#font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, Humor Sans, fantasy, xkcd #font.monospace : DejaVu Sans Mono, Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace ### TEXT From 3af95303b6772906a1f74089ee774d6123702ebf Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Fri, 22 Jul 2016 08:38:48 -0400 Subject: [PATCH 3/3] Fix quotation mistake --- lib/matplotlib/rcsetup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/rcsetup.py b/lib/matplotlib/rcsetup.py index a8af8f49611b..1fc24148c0a4 100644 --- a/lib/matplotlib/rcsetup.py +++ b/lib/matplotlib/rcsetup.py @@ -1000,7 +1000,7 @@ def validate_animation_writer_path(p): 'Sand', 'Script MT', 'Felipa', 'cursive'], validate_stringlist], 'font.fantasy': [['Comic Sans MS', 'Chicago', 'Charcoal', 'Impact' - 'Western', 'Humor Sans', 'fantasy, xkcd'], + 'Western', 'Humor Sans', 'fantasy', 'xkcd'], validate_stringlist], 'font.monospace': [['DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Computer Modern Typewriter',