Skip to content

Commit

Permalink
Legend default style change: smaller, no border
Browse files Browse the repository at this point in the history
Addresses matplotlib#5269
  • Loading branch information
efiring committed May 17, 2016
1 parent 3b8a6ec commit 05f2c3b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 26 deletions.
3 changes: 1 addition & 2 deletions lib/matplotlib/mpl-data/stylelib/classic.mplstyle
Expand Up @@ -267,7 +267,6 @@ grid.alpha : 1.0 # transparency, between 0.0 and 1.0
legend.fancybox : False # if True, use a rounded box for the
# legend, else a rectangle
legend.loc : upper right
legend.isaxes : True # this option is internally ignored
legend.numpoints : 2 # the number of points in the legend line
legend.fontsize : large
legend.borderpad : 0.4 # border whitespace in fontsize units
Expand Down Expand Up @@ -503,4 +502,4 @@ animation.convert_path: convert # Path to ImageMagick's convert binary.
animation.convert_args:
animation.html: none

_internal.classic_mode: True
_internal.classic_mode: True
6 changes: 2 additions & 4 deletions lib/matplotlib/rcsetup.py
Expand Up @@ -1102,8 +1102,6 @@ def validate_hist_bins(s):

#legend properties
'legend.fancybox': [True, validate_bool],

# at some point, legend.loc should be changed to 'best'
'legend.loc': ['best', validate_legend_loc],

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

Expand Down
39 changes: 19 additions & 20 deletions matplotlibrc.template
Expand Up @@ -388,33 +388,32 @@ backend : $TEMPLATE_BACKEND


### GRIDS
#grid.color : b0b0b0 # grid color
#grid.color : b0b0b0 # grid color
#grid.linestyle : - # solid
#grid.linewidth : 1.0 # in points
#grid.alpha : 1.0 # transparency, between 0.0 and 1.0

### Legend
#legend.fancybox : True # if True, use a rounded box for the
# legend, else a rectangle
#legend.loc : best
#legend.isaxes : True
#legend.numpoints : 1 # the number of points in the legend line
#legend.fontsize : large
#legend.borderpad : 0.5 # border whitespace in fontsize units
#legend.markerscale : 1.0 # the relative size of legend markers vs. original
# the following dimensions are in axes coords
#legend.labelspacing : 0.5 # the vertical space between the legend entries in fraction of fontsize
#legend.handlelength : 2. # the length of the legend lines in fraction of fontsize
#legend.handleheight : 0.7 # the height of the legend handle in fraction of fontsize
#legend.handletextpad : 0.8 # the space between the legend line and legend text in fraction of fontsize
#legend.borderaxespad : 0.5 # the border between the axes and legend edge in fraction of fontsize
#legend.columnspacing : 2. # the border between the axes and legend edge in fraction of fontsize
#legend.shadow : False
#legend.frameon : True # whether or not to draw a frame around legend
#legend.framealpha : None # opacity of of legend frame
#legend.scatterpoints : 3 # number of scatter points
#legend.facecolor : inherit
#legend.frameon : False # whether or not to draw a frame around legend
#legend.framealpha : None # legend frame transparency
#legend.facecolor : inherit # inherit from axes.facecolor; or color spec
#legend.edgecolor : k
#legend.fancybox : True # if True, use a rounded box for the
# legend, else a rectangle
#legend.shadow : False
#legend.numpoints : 1 # the number of marker points in the legend line
#legend.scatterpoints : 3 # number of scatter points
#legend.markerscale : 1.0 # the relative size of legend markers vs. original
#legend.fontsize : small
# Dimensions as fraction of fontsize:
#legend.borderpad : 0.4 # border whitespace
#legend.labelspacing : 0.5 # the vertical space between the legend entries
#legend.handlelength : 2.0 # the length of the legend lines
#legend.handleheight : 0.7 # the height of the legend handle
#legend.handletextpad : 0.8 # the space between the legend line and legend text
#legend.borderaxespad : 0.5 # the border between the axes and legend edge
#legend.columnspacing : 2.0 # column separation

### FIGURE
# See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure
Expand Down

0 comments on commit 05f2c3b

Please sign in to comment.