Skip to content

Commit 98d05d4

Browse files
authored
Merge pull request #10829 from timhoffm/rc-default-color-names
Use long color names for default rcParams
2 parents 74f06dd + 140b69a commit 98d05d4

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed

lib/matplotlib/rcsetup.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,13 +1011,13 @@ def _validate_linestyle(ls):
10111011

10121012
## patch props
10131013
'patch.linewidth': [1.0, validate_float], # line width in points
1014-
'patch.edgecolor': ['k', validate_color],
1014+
'patch.edgecolor': ['black', validate_color],
10151015
'patch.force_edgecolor' : [False, validate_bool],
10161016
'patch.facecolor': ['C0', validate_color], # first color in cycle
10171017
'patch.antialiased': [True, validate_bool], # antialiased (no jaggies)
10181018

10191019
## hatch props
1020-
'hatch.color': ['k', validate_color],
1020+
'hatch.color': ['black', validate_color],
10211021
'hatch.linewidth': [1.0, validate_float],
10221022

10231023
## Histogram properties
@@ -1035,23 +1035,23 @@ def _validate_linestyle(ls):
10351035
'boxplot.showfliers': [True, validate_bool],
10361036
'boxplot.meanline': [False, validate_bool],
10371037

1038-
'boxplot.flierprops.color': ['k', validate_color],
1038+
'boxplot.flierprops.color': ['black', validate_color],
10391039
'boxplot.flierprops.marker': ['o', validate_string],
10401040
'boxplot.flierprops.markerfacecolor': ['none', validate_color_or_auto],
1041-
'boxplot.flierprops.markeredgecolor': ['k', validate_color],
1041+
'boxplot.flierprops.markeredgecolor': ['black', validate_color],
10421042
'boxplot.flierprops.markersize': [6, validate_float],
10431043
'boxplot.flierprops.linestyle': ['none', _validate_linestyle],
10441044
'boxplot.flierprops.linewidth': [1.0, validate_float],
10451045

1046-
'boxplot.boxprops.color': ['k', validate_color],
1046+
'boxplot.boxprops.color': ['black', validate_color],
10471047
'boxplot.boxprops.linewidth': [1.0, validate_float],
10481048
'boxplot.boxprops.linestyle': ['-', _validate_linestyle],
10491049

1050-
'boxplot.whiskerprops.color': ['k', validate_color],
1050+
'boxplot.whiskerprops.color': ['black', validate_color],
10511051
'boxplot.whiskerprops.linewidth': [1.0, validate_float],
10521052
'boxplot.whiskerprops.linestyle': ['-', _validate_linestyle],
10531053

1054-
'boxplot.capprops.color': ['k', validate_color],
1054+
'boxplot.capprops.color': ['black', validate_color],
10551055
'boxplot.capprops.linewidth': [1.0, validate_float],
10561056
'boxplot.capprops.linestyle': ['-', _validate_linestyle],
10571057

@@ -1099,7 +1099,7 @@ def _validate_linestyle(ls):
10991099
validate_stringlist],
11001100

11011101
# text props
1102-
'text.color': ['k', validate_color], # black
1102+
'text.color': ['black', validate_color],
11031103
'text.usetex': [False, validate_bool],
11041104
'text.latex.unicode': [False, validate_bool],
11051105
'text.latex.preamble': [[''], validate_stringlist],
@@ -1139,8 +1139,8 @@ def _validate_linestyle(ls):
11391139
# axes props
11401140
'axes.axisbelow': ['line', validate_axisbelow],
11411141
'axes.hold': [None, deprecate_axes_hold],
1142-
'axes.facecolor': ['w', validate_color], # background color; white
1143-
'axes.edgecolor': ['k', validate_color], # edge color; black
1142+
'axes.facecolor': ['white', validate_color], # background color
1143+
'axes.edgecolor': ['black', validate_color], # edge color
11441144
'axes.linewidth': [0.8, validate_float], # edge linewidth
11451145

11461146
'axes.spines.left': [True, validate_bool], # Set visibility of axes
@@ -1163,7 +1163,7 @@ def _validate_linestyle(ls):
11631163
# x any y labels
11641164
'axes.labelpad': [4.0, validate_float], # space between label and axis
11651165
'axes.labelweight': ['normal', validate_string], # fontsize of the x any y labels
1166-
'axes.labelcolor': ['k', validate_color], # color of axis label
1166+
'axes.labelcolor': ['black', validate_color], # color of axis label
11671167
'axes.formatter.limits': [[-7, 7], validate_nseq_int(2)],
11681168
# use scientific notation if log10
11691169
# of the axis range is smaller than the
@@ -1256,7 +1256,7 @@ def _validate_linestyle(ls):
12561256
'xtick.minor.width': [0.6, validate_float], # minor xtick width in points
12571257
'xtick.major.pad': [3.5, validate_float], # distance to label in points
12581258
'xtick.minor.pad': [3.4, validate_float], # distance to label in points
1259-
'xtick.color': ['k', validate_color], # color of the xtick labels
1259+
'xtick.color': ['black', validate_color], # color of the xtick labels
12601260
'xtick.minor.visible': [False, validate_bool], # visibility of the x axis minor ticks
12611261
'xtick.minor.top': [True, validate_bool], # draw x axis top minor ticks
12621262
'xtick.minor.bottom': [True, validate_bool], # draw x axis bottom minor ticks
@@ -1278,7 +1278,7 @@ def _validate_linestyle(ls):
12781278
'ytick.minor.width': [0.6, validate_float], # minor ytick width in points
12791279
'ytick.major.pad': [3.5, validate_float], # distance to label in points
12801280
'ytick.minor.pad': [3.4, validate_float], # distance to label in points
1281-
'ytick.color': ['k', validate_color], # color of the ytick labels
1281+
'ytick.color': ['black', validate_color], # color of the ytick labels
12821282
'ytick.minor.visible': [False, validate_bool], # visibility of the y axis minor ticks
12831283
'ytick.minor.left': [True, validate_bool], # draw y axis left minor ticks
12841284
'ytick.minor.right': [True, validate_bool], # draw y axis right minor ticks
@@ -1305,8 +1305,8 @@ def _validate_linestyle(ls):
13051305
# figure size in inches: width by height
13061306
'figure.figsize': [[6.4, 4.8], validate_nseq_float(2)],
13071307
'figure.dpi': [100, validate_float], # DPI
1308-
'figure.facecolor': ['w', validate_color], # facecolor; white
1309-
'figure.edgecolor': ['w', validate_color], # edgecolor; white
1308+
'figure.facecolor': ['white', validate_color],
1309+
'figure.edgecolor': ['white', validate_color],
13101310
'figure.frameon': [True, validate_bool],
13111311
'figure.autolayout': [False, validate_bool],
13121312
'figure.max_open_warning': [20, validate_int],
@@ -1339,8 +1339,8 @@ def _validate_linestyle(ls):
13391339

13401340
## Saving figure's properties
13411341
'savefig.dpi': ['figure', validate_dpi], # DPI
1342-
'savefig.facecolor': ['w', validate_color], # facecolor; white
1343-
'savefig.edgecolor': ['w', validate_color], # edgecolor; white
1342+
'savefig.facecolor': ['white', validate_color],
1343+
'savefig.edgecolor': ['white', validate_color],
13441344
'savefig.frameon': [True, validate_bool],
13451345
'savefig.orientation': ['portrait', validate_orientation], # edgecolor;
13461346
#white

matplotlibrc.template

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ backend : $TEMPLATE_BACKEND
101101
## information on patch properties
102102
#patch.linewidth : 1 ## edge width in points.
103103
#patch.facecolor : C0
104-
#patch.edgecolor : k ## if forced, or patch is not filled
104+
#patch.edgecolor : black ## if forced, or patch is not filled
105105
#patch.force_edgecolor : False ## True to always use edgecolor
106106
#patch.antialiased : True ## render patches in antialiased (no jaggies)
107107

108108
#### HATCHES
109-
#hatch.color : k
109+
#hatch.color : black
110110
#hatch.linewidth : 1.0
111111

112112
#### Boxplot
@@ -121,23 +121,23 @@ backend : $TEMPLATE_BACKEND
121121
#boxplot.showfliers : True
122122
#boxplot.meanline : False
123123

124-
#boxplot.flierprops.color : k
124+
#boxplot.flierprops.color : black
125125
#boxplot.flierprops.marker : o
126126
#boxplot.flierprops.markerfacecolor : none
127-
#boxplot.flierprops.markeredgecolor : k
127+
#boxplot.flierprops.markeredgecolor : black
128128
#boxplot.flierprops.markersize : 6
129129
#boxplot.flierprops.linestyle : none
130130
#boxplot.flierprops.linewidth : 1.0
131131

132-
#boxplot.boxprops.color : k
132+
#boxplot.boxprops.color : black
133133
#boxplot.boxprops.linewidth : 1.0
134134
#boxplot.boxprops.linestyle : -
135135

136-
#boxplot.whiskerprops.color : k
136+
#boxplot.whiskerprops.color : black
137137
#boxplot.whiskerprops.linewidth : 1.0
138138
#boxplot.whiskerprops.linestyle : -
139139

140-
#boxplot.capprops.color : k
140+
#boxplot.capprops.color : black
141141
#boxplot.capprops.linewidth : 1.0
142142
#boxplot.capprops.linestyle : -
143143

@@ -211,7 +211,7 @@ backend : $TEMPLATE_BACKEND
211211
## text properties used by text.Text. See
212212
## http://matplotlib.org/api/artist_api.html#module-matplotlib.text for more
213213
## information on text properties
214-
#text.color : k
214+
#text.color : black
215215

216216
#### LaTeX customizations. See http://wiki.scipy.org/Cookbook/Matplotlib/UsingTex
217217
#text.usetex : False ## use latex for all text handling. The following fonts
@@ -280,8 +280,8 @@ backend : $TEMPLATE_BACKEND
280280
## default face and edge color, default tick sizes,
281281
## default fontsizes for ticklabels, and so on. See
282282
## http://matplotlib.org/api/axes_api.html#module-matplotlib.axes
283-
#axes.facecolor : w ## axes background color
284-
#axes.edgecolor : k ## axes edge color
283+
#axes.facecolor : white ## axes background color
284+
#axes.edgecolor : black ## axes edge color
285285
#axes.linewidth : 0.8 ## edge linewidth
286286
#axes.grid : False ## display grid or not
287287
#axes.grid.axis : both ## which axis the grid should apply to
@@ -292,7 +292,7 @@ backend : $TEMPLATE_BACKEND
292292
#axes.labelsize : medium ## fontsize of the x any y labels
293293
#axes.labelpad : 4.0 ## space between label and axis
294294
#axes.labelweight : normal ## weight of the x and y labels
295-
#axes.labelcolor : k
295+
#axes.labelcolor : black
296296
#axes.axisbelow : line ## draw axis gridlines and ticks below
297297
## patches (True); above patches but below
298298
## lines ('line'); or above all (False)
@@ -364,7 +364,7 @@ backend : $TEMPLATE_BACKEND
364364
#xtick.minor.width : 0.6 ## minor tick width in points
365365
#xtick.major.pad : 3.5 ## distance to major tick label in points
366366
#xtick.minor.pad : 3.4 ## distance to the minor tick label in points
367-
#xtick.color : k ## color of the tick labels
367+
#xtick.color : black ## color of the tick labels
368368
#xtick.labelsize : medium ## fontsize of the tick labels
369369
#xtick.direction : out ## direction: in, out, or inout
370370
#xtick.minor.visible : False ## visibility of minor ticks on x-axis
@@ -384,7 +384,7 @@ backend : $TEMPLATE_BACKEND
384384
#ytick.minor.width : 0.6 ## minor tick width in points
385385
#ytick.major.pad : 3.5 ## distance to major tick label in points
386386
#ytick.minor.pad : 3.4 ## distance to the minor tick label in points
387-
#ytick.color : k ## color of the tick labels
387+
#ytick.color : black ## color of the tick labels
388388
#ytick.labelsize : medium ## fontsize of the tick labels
389389
#ytick.direction : out ## direction: in, out, or inout
390390
#ytick.minor.visible : False ## visibility of minor ticks on y-axis
@@ -428,9 +428,9 @@ backend : $TEMPLATE_BACKEND
428428
#figure.titleweight : normal ## weight of the figure title
429429
#figure.figsize : 6.4, 4.8 ## figure size in inches
430430
#figure.dpi : 100 ## figure dots per inch
431-
#figure.facecolor : w ## figure facecolor; 0.75 is scalar gray
432-
#figure.edgecolor : w ## figure edgecolor
433-
#figure.frameon : True ## enable figure frame
431+
#figure.facecolor : white ## figure facecolor
432+
#figure.edgecolor : white ## figure edgecolor
433+
#figure.frameon : True ## enable figure frame
434434
#figure.max_open_warning : 20 ## The maximum number of figures to open through
435435
## the pyplot interface before emitting a warning.
436436
## If less than one this feature is disabled.
@@ -517,8 +517,8 @@ backend : $TEMPLATE_BACKEND
517517
## e.g., you may want a higher resolution, or to make the figure
518518
## background white
519519
#savefig.dpi : figure ## figure dots per inch or 'figure'
520-
#savefig.facecolor : w ## figure facecolor when saving
521-
#savefig.edgecolor : w ## figure edgecolor when saving
520+
#savefig.facecolor : white ## figure facecolor when saving
521+
#savefig.edgecolor : white ## figure edgecolor when saving
522522
#savefig.format : png ## png, ps, pdf, svg
523523
#savefig.bbox : standard ## 'tight' or 'standard'.
524524
## 'tight' is incompatible with pipe-based animation

0 commit comments

Comments
 (0)