Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/matplotlib/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ def __init__(self, xdata, ydata,
linestyle = rcParams['lines.linestyle']
if marker is None:
marker = rcParams['lines.marker']
if markerfacecolor is None:
markerfacecolor = rcParams['lines.markerfacecolor']
if markeredgecolor is None:
markeredgecolor = rcParams['lines.markeredgecolor']
if color is None:
color = rcParams['lines.color']

Expand Down
2 changes: 2 additions & 0 deletions lib/matplotlib/mpl-data/stylelib/classic.mplstyle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ lines.linewidth : 1.0 # line width in points
lines.linestyle : - # solid line
lines.color : b # has no affect on plot(); see axes.prop_cycle
lines.marker : None # the default marker
lines.markerfacecolor : auto # the default markerfacecolor
lines.markeredgecolor : auto # the default markeredgecolor
lines.markeredgewidth : 0.5 # the line width around the marker symbol
lines.markersize : 6 # markersize, in points
lines.dash_joinstyle : round # miter|round|bevel
Expand Down
2 changes: 2 additions & 0 deletions lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,8 @@ def _validate_linestyle(ls):
'lines.linestyle': ['-', _validate_linestyle], # solid line
'lines.color': ['C0', validate_color], # first color in color cycle
'lines.marker': ['None', validate_string], # marker name
'lines.markerfacecolor': ['auto', validate_color_or_auto], # default color
'lines.markeredgecolor': ['auto', validate_color_or_auto], # default color
'lines.markeredgewidth': [1.0, validate_float],
'lines.markersize': [6, validate_float], # markersize, in points
'lines.antialiased': [True, validate_bool], # antialiased (no jaggies)
Expand Down
12 changes: 12 additions & 0 deletions lib/matplotlib/tests/test_rcparams.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,18 @@ def test_legend_colors(color_type, param_dict, target):
assert getattr(leg.legendPatch, get_func)() == target


def test_mfc_rcparams():
mpl.rcParams['lines.markerfacecolor'] = 'r'
ln = mpl.lines.Line2D([1, 2], [1, 2])
assert ln.get_markerfacecolor() == 'r'


def test_mec_rcparams():
mpl.rcParams['lines.markeredgecolor'] = 'r'
ln = mpl.lines.Line2D([1, 2], [1, 2])
assert ln.get_markeredgecolor() == 'r'


def test_Issue_1713():
utf32_be = os.path.join(os.path.dirname(__file__),
'test_utf32_be_rcparams.rc')
Expand Down
2 changes: 2 additions & 0 deletions matplotlibrc.template
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ backend : $TEMPLATE_BACKEND
#lines.linestyle : - ## solid line
#lines.color : C0 ## has no affect on plot(); see axes.prop_cycle
#lines.marker : None ## the default marker
#lines.markerfacecolor : auto ## the default markerfacecolor
#lines.markeredgecolor : auto ## the default markeredgecolor
#lines.markeredgewidth : 1.0 ## the line width around the marker symbol
#lines.markersize : 6 ## markersize, in points
#lines.dash_joinstyle : round ## miter|round|bevel
Expand Down