diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index c20073adc801..d6e4f50a2d7e 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -1733,7 +1733,7 @@ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none, #### Specialized plotting @_preprocess_data(replace_names=["x", "y"], label_namer="y") - def step(self, x, y, *args, where='pre', linestyle='', **kwargs): + def step(self, x, y, *args, where='pre', **kwargs): """ Make a step plot. @@ -1797,7 +1797,7 @@ def step(self, x, y, *args, where='pre', linestyle='', **kwargs): if where not in ('pre', 'post', 'mid'): raise ValueError("'where' argument to step must be " "'pre', 'post' or 'mid'") - kwargs['linestyle'] = 'steps-' + where + linestyle + kwargs['linestyle'] = 'steps-' + where + kwargs.get('linestyle', '') return self.plot(x, y, *args, **kwargs)