Problem
When I use fill_between, I typically want a plotted line as well. A nice way of doing this on several axes is to use a dict of keyword arguments, e.g.
kw = dict(color: 'red', ls='--', lw=1)
ax.plot(..., **kw)
ax.fill_between(..., **kw)
One thing that can't be set this way is the drawstyle, because for some reason fill_between has its own syntax for this which differs from other methods.
Both the argument name and the way it's processed are different:
- plot takes
drawstyle or ds, with options 'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'
- fill_between takes
step with options 'pre', 'post', 'mid', and requires you to not pass in a step argument to get the default interpolating behaviour
This makes it really annoying to use, especially when automating.
Also has created some confusion in the past: #19524
Proposed solution
- Add
drawstyle and ds arguments to fill_between, that are processed the same as for plot
- Deprecate the
step argument to fill_between
Problem
When I use fill_between, I typically want a plotted line as well. A nice way of doing this on several axes is to use a dict of keyword arguments, e.g.
One thing that can't be set this way is the
drawstyle, because for some reasonfill_betweenhas its own syntax for this which differs from other methods.Both the argument name and the way it's processed are different:
drawstyleords, with options 'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'stepwith options 'pre', 'post', 'mid', and requires you to not pass in astepargument to get the default interpolating behaviourThis makes it really annoying to use, especially when automating.
Also has created some confusion in the past: #19524
Proposed solution
drawstyleanddsarguments tofill_between, that are processed the same as forplotstepargument tofill_between