Skip to content

fill_demo and fill_between_demo are slightly misleading #5827

Closed

Description

@anntzer

Activity

  1. mdboom commented on Jan 11, 2016

    @mdboom
    Member

    I agree that would improve things.

  2. jenshnielsen commented on Jan 11, 2016

    @jenshnielsen
    Member

    Tagged with MEP12 since this relates to the more general example improvement effort defined in MEP12

  3. anntzer commented on Jan 11, 2016

    @anntzer
    ContributorAuthor

    Suggestion:
    use plt.fill([0, 0, 1, 2, 2], [0, 1, 2, 1, 0])
    for fill_demo
    and plt.fill([0, 0, 1, 2, 2], [0, 1, 2, 1, 0], "b", [1, 1, 2, 3, 3], [1, 2, 3, 2, 1], "r", alpha=.3)
    for fill_demo_features.
    I'll make a PR if this sounds good.

  4. SKPsanjeevi commented on Apr 28, 2017

    @SKPsanjeevi

    Newbie here. I pulled the repo. But it contains fill.py, which does both the plots for fill_demo.html and fill_demo_features.html. How can I resolve the issue? Should I change as suggested by @anntzer in fill.py?

  5. phobson commented on Apr 28, 2017

    @phobson
    Member

    @pssk1988 this issue is a little stale. The two examples have been merged into the fill.py file that you see. Modifying those examples should suffice to address this issue.

    http://matplotlib.org/devdocs/gallery/lines_bars_and_markers/fill.html#sphx-glr-gallery-lines-bars-and-markers-fill-py

  6. SKPsanjeevi commented on Apr 28, 2017

    @SKPsanjeevi

    @phobson : Then shall we leave the second plot (demo_features) with sinusoidal curves as it is? Or should I change it to overlapping polygons as suggested by @anntzer ?

  7. samvaughan commented on Apr 9, 2018

    @samvaughan

    I made some simple changes to fill.py in pull request #11009. I changed the first example to be a polygon (as suggested here) and the second to ensure that the polygon didn't finish at y=0 anymore.

  8. QuLogic commented on Jul 21, 2020

    @QuLogic
    Member

    Seems like these examples are merged and the misleading parts are fixed by #11009.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    MEP: MEP12gallery and examples improvements

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions