Skip to content

Commit 4620388

Browse files
author
Thomas A Caswell
committed
added rcParam['legend.scatterpoints']
1 parent 8d609dd commit 4620388

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

lib/matplotlib/legend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def __init__(self, parent, handles, labels,
135135
numpoints=None, # the number of points in the legend line
136136
markerscale=None, # the relative size of legend markers
137137
# vs. original
138-
scatterpoints=3, # TODO: may be an rcParam
138+
scatterpoints=None, # TODO: may be an rcParam
139139
scatteryoffsets=None,
140140
prop=None, # properties for the legend texts
141141
fontsize=None, # keyword to set font size directly

lib/matplotlib/rcsetup.py

+1
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ def __call__(self, s):
511511
'legend.loc' : ['upper right',validate_legend_loc], # at some point, this should be changed to 'best'
512512
'legend.isaxes' : [True,validate_bool], # this option is internally ignored - it never served any useful purpose
513513
'legend.numpoints' : [2, validate_int], # the number of points in the legend line
514+
'legend.scatterpoints' : [3, validate_int], # the number of points in the legend line for scatter
514515
'legend.fontsize' : ['large', validate_fontsize],
515516
'legend.markerscale' : [1.0, validate_float], # the relative size of legend markers vs. original
516517
'legend.shadow' : [False, validate_bool],

matplotlibrc.template

+1
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ text.hinting_factor : 8 # Specifies the amount of softness for hinting in the
295295
#legend.columnspacing : 2. # the border between the axes and legend edge in fraction of fontsize
296296
#legend.shadow : False
297297
#legend.frameon : True # whether or not to draw a frame around legend
298+
#legend.scatterpoints : 3 # number of scatter points
298299

299300
### FIGURE
300301
# See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure

0 commit comments

Comments
 (0)