Skip to content

Revert explicit linestyle kwarg on step() #11211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 10, 2018
Merged
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: 2 additions & 2 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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', '')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pop, no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...he's overwriting the same kwarg...


return self.plot(x, y, *args, **kwargs)

Expand Down