Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d4edb56

Browse files
committed
Use relative font sizes by default so they will scale with font.size
svn path=/trunk/matplotlib/; revision=5606
1 parent 4f724ce commit d4edb56

3 files changed

Lines changed: 16 additions & 11 deletions

File tree

CHANGELOG

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2008-06-19 Use relative font sizes (e.g. 'medium' and 'large') in
2+
rcsetup.py and matplotlibrc.template so that text will
3+
be scaled by default when changing rcParams['font.size'] -
4+
EF
5+
16
2008-06-17 Add a generic PatchCollection class that can contain any
27
kind of patch. - MGD
38

@@ -24,7 +29,7 @@
2429
sets '_nolegend_' for the other patch labels. This lets
2530
autolegend work as expected for hist and bar - see
2631
https://sourceforge.net/tracker/index.php?func=detail&aid=1986597&group_id=80706&atid=560720
27-
JDH
32+
JDH
2833

2934
2008-06-10 Fix text baseline alignment bug. [ 1985420 ] Repair of
3035
baseline alignment in Text._get_layout. Thanks Stan West -

lib/matplotlib/rcsetup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ def __call__(self, s):
394394
'axes.facecolor' : ['w', validate_color], # background color; white
395395
'axes.edgecolor' : ['k', validate_color], # edge color; black
396396
'axes.linewidth' : [1.0, validate_float], # edge linewidth
397-
'axes.titlesize' : [14, validate_fontsize], # fontsize of the axes title
397+
'axes.titlesize' : ['large', validate_fontsize], # fontsize of the axes title
398398
'axes.grid' : [False, validate_bool], # display grid or not
399-
'axes.labelsize' : [12, validate_fontsize], # fontsize of the x any y labels
399+
'axes.labelsize' : ['medium', validate_fontsize], # fontsize of the x any y labels
400400
'axes.labelcolor' : ['k', validate_color], # color of axis label
401401
'axes.formatter.limits' : [[-7, 7], validate_nseq_int(2)],
402402
# use scientific notation if log10
@@ -409,7 +409,7 @@ def __call__(self, s):
409409
'legend.loc' : ['upper right',validate_legend_loc], # at some point, this should be changed to 'best'
410410
'legend.isaxes' : [True,validate_bool], # this option is internally ignored - it never served any useful purpose
411411
'legend.numpoints' : [2, validate_int], # the number of points in the legend line
412-
'legend.fontsize' : [14, validate_fontsize],
412+
'legend.fontsize' : ['large', validate_fontsize],
413413
'legend.pad' : [0.2, validate_float], # the fractional whitespace inside the legend border
414414
'legend.markerscale' : [1.0, validate_float], # the relative size of legend markers vs. original
415415

@@ -427,15 +427,15 @@ def __call__(self, s):
427427
'xtick.major.pad' : [4, validate_float], # distance to label in points
428428
'xtick.minor.pad' : [4, validate_float], # distance to label in points
429429
'xtick.color' : ['k', validate_color], # color of the xtick labels
430-
'xtick.labelsize' : [12, validate_fontsize], # fontsize of the xtick labels
430+
'xtick.labelsize' : ['medium', validate_fontsize], # fontsize of the xtick labels
431431
'xtick.direction' : ['in', str], # direction of xticks
432432

433433
'ytick.major.size' : [4, validate_float], # major ytick size in points
434434
'ytick.minor.size' : [2, validate_float], # minor ytick size in points
435435
'ytick.major.pad' : [4, validate_float], # distance to label in points
436436
'ytick.minor.pad' : [4, validate_float], # distance to label in points
437437
'ytick.color' : ['k', validate_color], # color of the ytick labels
438-
'ytick.labelsize' : [12, validate_fontsize], # fontsize of the ytick labels
438+
'ytick.labelsize' : ['medium', validate_fontsize], # fontsize of the ytick labels
439439
'ytick.direction' : ['in', str], # direction of yticks
440440

441441
'grid.color' : ['k', validate_color], # grid color

matplotlibrc.template

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ numerix : %(numerix)s # numpy, Numeric or numarray
185185
#axes.edgecolor : black # axes edge color
186186
#axes.linewidth : 1.0 # edge linewidth
187187
#axes.grid : False # display grid or not
188-
#axes.titlesize : 14 # fontsize of the axes title
189-
#axes.labelsize : 12 # fontsize of the x any y labels
188+
#axes.titlesize : large # fontsize of the axes title
189+
#axes.labelsize : medium # fontsize of the x any y labels
190190
#axes.labelcolor : black
191191
#axes.axisbelow : False # whether axis gridlines and ticks are below
192192
# the axes elements (lines, text, etc)
@@ -203,15 +203,15 @@ numerix : %(numerix)s # numpy, Numeric or numarray
203203
#xtick.major.pad : 4 # distance to major tick label in points
204204
#xtick.minor.pad : 4 # distance to the minor tick label in points
205205
#xtick.color : k # color of the tick labels
206-
#xtick.labelsize : 12 # fontsize of the tick labels
206+
#xtick.labelsize : medium # fontsize of the tick labels
207207
#xtick.direction : in # direction: in or out
208208

209209
#ytick.major.size : 4 # major tick size in points
210210
#ytick.minor.size : 2 # minor tick size in points
211211
#ytick.major.pad : 4 # distance to major tick label in points
212212
#ytick.minor.pad : 4 # distance to the minor tick label in points
213213
#ytick.color : k # color of the tick labels
214-
#ytick.labelsize : 12 # fontsize of the tick labels
214+
#ytick.labelsize : medium # fontsize of the tick labels
215215
#ytick.direction : in # direction: in or out
216216

217217

@@ -223,7 +223,7 @@ numerix : %(numerix)s # numpy, Numeric or numarray
223223
### Legend
224224
#legend.isaxes : True
225225
#legend.numpoints : 2 # the number of points in the legend line
226-
#legend.fontsize : 14
226+
#legend.fontsize : large
227227
#legend.pad : 0.2 # the fractional whitespace inside the legend border
228228
#legend.markerscale : 1.0 # the relative size of legend markers vs. original
229229
# the following dimensions are in axes coords

0 commit comments

Comments
 (0)