Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
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 thedrawstyle
, because for some reasonfill_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
ords
, 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 astep
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
andds
arguments tofill_between
, that are processed the same as forplot
- Deprecate the
step
argument tofill_between