Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[ENH]: Make fill_between 'step' argument consistent with plot #29653

Open
@MichaelClerx

Description

@MichaelClerx

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 takesdrawstyle ords, with options 'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'
  • fill_between takesstep 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

  1. Adddrawstyle andds arguments tofill_between, that are processed the same as forplot
  2. Deprecate thestep argument tofill_between

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp