Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 52bf093

Browse filesBrowse files
committed
Legend default style change: smaller, no border
Addresses #5269
1 parent 8e57552 commit 52bf093
Copy full SHA for 52bf093

File tree

Expand file treeCollapse file tree

3 files changed

+22
-26
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+22
-26
lines changed

‎lib/matplotlib/mpl-data/stylelib/classic.mplstyle

Copy file name to clipboardExpand all lines: lib/matplotlib/mpl-data/stylelib/classic.mplstyle
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ grid.alpha : 1.0 # transparency, between 0.0 and 1.0
267267
legend.fancybox : False # if True, use a rounded box for the
268268
# legend, else a rectangle
269269
legend.loc : upper right
270-
legend.isaxes : True # this option is internally ignored
271270
legend.numpoints : 2 # the number of points in the legend line
272271
legend.fontsize : large
273272
legend.borderpad : 0.4 # border whitespace in fontsize units
@@ -503,4 +502,4 @@ animation.convert_path: convert # Path to ImageMagick's convert binary.
503502
animation.convert_args:
504503
animation.html: none
505504

506-
_internal.classic_mode: True
505+
_internal.classic_mode: True

‎lib/matplotlib/rcsetup.py

Copy file name to clipboardExpand all lines: lib/matplotlib/rcsetup.py
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,8 +1102,6 @@ def validate_hist_bins(s):
11021102

11031103
#legend properties
11041104
'legend.fancybox': [True, validate_bool],
1105-
1106-
# at some point, legend.loc should be changed to 'best'
11071105
'legend.loc': ['best', validate_legend_loc],
11081106

11091107
# this option is internally ignored - it never served any useful purpose
@@ -1113,12 +1111,12 @@ def validate_hist_bins(s):
11131111
'legend.numpoints': [1, validate_int],
11141112
# the number of points in the legend line for scatter
11151113
'legend.scatterpoints': [3, validate_int],
1116-
'legend.fontsize': ['large', validate_fontsize],
1114+
'legend.fontsize': ['small', validate_fontsize],
11171115
# the relative size of legend markers vs. original
11181116
'legend.markerscale': [1.0, validate_float],
11191117
'legend.shadow': [False, validate_bool],
11201118
# whether or not to draw a frame around legend
1121-
'legend.frameon': [True, validate_bool],
1119+
'legend.frameon': [False, validate_bool],
11221120
# alpha value of the legend frame
11231121
'legend.framealpha': [None, validate_float_or_None],
11241122

‎matplotlibrc.template

Copy file name to clipboardExpand all lines: matplotlibrc.template
+19-20Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -388,33 +388,32 @@ backend : $TEMPLATE_BACKEND
388388

389389

390390
### GRIDS
391-
#grid.color : b0b0b0 # grid color
391+
#grid.color : b0b0b0 # grid color
392392
#grid.linestyle : - # solid
393393
#grid.linewidth : 1.0 # in points
394394
#grid.alpha : 1.0 # transparency, between 0.0 and 1.0
395395

396396
### Legend
397-
#legend.fancybox : True # if True, use a rounded box for the
398-
# legend, else a rectangle
399397
#legend.loc : best
400-
#legend.isaxes : True
401-
#legend.numpoints : 1 # the number of points in the legend line
402-
#legend.fontsize : large
403-
#legend.borderpad : 0.5 # border whitespace in fontsize units
404-
#legend.markerscale : 1.0 # the relative size of legend markers vs. original
405-
# the following dimensions are in axes coords
406-
#legend.labelspacing : 0.5 # the vertical space between the legend entries in fraction of fontsize
407-
#legend.handlelength : 2. # the length of the legend lines in fraction of fontsize
408-
#legend.handleheight : 0.7 # the height of the legend handle in fraction of fontsize
409-
#legend.handletextpad : 0.8 # the space between the legend line and legend text in fraction of fontsize
410-
#legend.borderaxespad : 0.5 # the border between the axes and legend edge in fraction of fontsize
411-
#legend.columnspacing : 2. # the border between the axes and legend edge in fraction of fontsize
412-
#legend.shadow : False
413-
#legend.frameon : True # whether or not to draw a frame around legend
414-
#legend.framealpha : None # opacity of of legend frame
415-
#legend.scatterpoints : 3 # number of scatter points
416-
#legend.facecolor : inherit
398+
#legend.frameon : False # whether or not to draw a frame around legend
399+
#legend.framealpha : None # legend frame transparency
400+
#legend.facecolor : inherit # inherit from axes.facecolor; or color spec
417401
#legend.edgecolor : k
402+
#legend.fancybox : True # if True, use a rounded box for the
403+
# legend, else a rectangle
404+
#legend.shadow : False
405+
#legend.numpoints : 1 # the number of marker points in the legend line
406+
#legend.scatterpoints : 3 # number of scatter points
407+
#legend.markerscale : 1.0 # the relative size of legend markers vs. original
408+
#legend.fontsize : small
409+
# Dimensions as fraction of fontsize:
410+
#legend.borderpad : 0.4 # border whitespace
411+
#legend.labelspacing : 0.5 # the vertical space between the legend entries
412+
#legend.handlelength : 2.0 # the length of the legend lines
413+
#legend.handleheight : 0.7 # the height of the legend handle
414+
#legend.handletextpad : 0.8 # the space between the legend line and legend text
415+
#legend.borderaxespad : 0.5 # the border between the axes and legend edge
416+
#legend.columnspacing : 2.0 # column separation
418417

419418
### FIGURE
420419
# See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.