Skip to content

Commit

Permalink
fix matplotlib#4854: set default numpoints of legend entries to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
gauteh authored and mdboom committed Nov 23, 2015
1 parent 4d2cd4c commit 59dfe12
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions doc/users/whats_new/style_changes.rst
Expand Up @@ -9,5 +9,7 @@ are designed to work well in the most common cases.

These changes include:

- By default, the number of points displayed in a legend is now 1.

- The ''Blues'' colormap has been adjusted to be perceptually uniform. The old
``blues`` colormap is available under the name ``legacy_Blues``.
2 changes: 1 addition & 1 deletion lib/matplotlib/mpl-data/stylelib/classic.mplstyle
Expand Up @@ -253,7 +253,7 @@ 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.numpoints : 1 # the number of points in the legend line
legend.fontsize : large
legend.borderpad : 0.4 # border whitespace in fontsize units
legend.markerscale : 1.0 # the relative size of legend markers vs. original
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/rcsetup.py
Expand Up @@ -988,7 +988,7 @@ def validate_cycler(s):
'legend.isaxes': [True, validate_bool],

# the number of points in the legend line
'legend.numpoints': [2, validate_int],
'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],
Expand Down
2 changes: 1 addition & 1 deletion matplotlibrc.template
Expand Up @@ -362,7 +362,7 @@ backend : %(backend)s
#legend.fancybox : False # if True, use a rounded box for the
# legend, else a rectangle
#legend.isaxes : True
#legend.numpoints : 2 # the number of points in the legend line
#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
Expand Down

0 comments on commit 59dfe12

Please sign in to comment.