X Tutup
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: 2 additions & 2 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4732,7 +4732,7 @@ def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
y1slice = y1[ind0:ind1]
y2slice = y2[ind0:ind1]
if step is not None:
step_func = STEP_LOOKUP_MAP[step]
step_func = STEP_LOOKUP_MAP["steps-" + step]
xslice, y1slice, y2slice = step_func(xslice, y1slice, y2slice)

if not len(xslice):
Expand Down Expand Up @@ -4882,7 +4882,7 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
x1slice = x1[ind0:ind1]
x2slice = x2[ind0:ind1]
if step is not None:
step_func = STEP_LOOKUP_MAP[step]
step_func = STEP_LOOKUP_MAP["steps-" + step]
yslice, x1slice, x2slice = step_func(yslice, x1slice, x2slice)

if not len(yslice):
Expand Down
8 changes: 5 additions & 3 deletions lib/matplotlib/backends/qt_editor/figureoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ def get_icon(name):
'none': 'None',
}

DRAWSTYLES = {'default': 'Default',
'steps': 'Steps',
}
DRAWSTYLES = {
'default': 'Default',
'steps-pre': 'Steps (Pre)', 'steps': 'Steps (Pre)',
'steps-mid': 'Steps (Mid)',
'steps-post': 'Steps (Post)'}

MARKERS = markers.MarkerStyle.markers

Expand Down
4 changes: 1 addition & 3 deletions lib/matplotlib/cbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -2395,10 +2395,8 @@ def pts_to_midstep(x, *args):
# convert 2D array back to tuple
return tuple(steps)


STEP_LOOKUP_MAP = {'default': lambda x, y: (x, y),
'pre': pts_to_prestep,
'post': pts_to_poststep,
'mid': pts_to_midstep,
'steps': pts_to_prestep,
'steps-pre': pts_to_prestep,
'steps-post': pts_to_poststep,
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,8 +987,7 @@ def set_drawstyle(self, drawstyle):
if drawstyle is None:
drawstyle = 'default'
if drawstyle not in self.drawStyles:
raise ValueError('Unrecognized drawstyle ' +
' '.join(self.drawStyleKeys))
raise ValueError('Unrecognized drawstyle {!r}'.format(drawstyle))
if self._drawstyle != drawstyle:
self.stale = True
self._drawstyle = drawstyle
Expand Down
X Tutup