FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

DOC: Duplicate examples of AnchoredArtists gallery · Issue #11092 · matplotlib/matplotlib · GitHub

Repository navigation

DOC: Duplicate examples of AnchoredArtists gallery #11092

Closed

Description

The documentation pages at https://matplotlib.org/gallery/axes_grid1/simple_anchored_artists.html and https://matplotlib.org/gallery/misc/anchored_artists.html appear to be nearly duplicates of each other. However, the first one is much more complete, and demonstrates a much less complicated way of achieving he same thing.

The first linked page has a if 1: "guard" while the second one has if __name__ == '__main__':. Given the overall trend in the examples, neither seems necessary.

An even simpler example, that is fully covered by the other ones, is given in https://matplotlib.org/gallery/userdemo/anchored_box01.html

My personal take on this is:

I'll be happy to submit a PR if a couple of senior folks approve.

P.S. The reason for all this is in the comment section of https://stackoverflow.com/a/49933937/2988730, when I realized I was giving somebody incomplete, or possibly outright bad advice.

Activity

  1. madphysicist commented on Apr 20, 2018

    ContributorAuthor

    I see how it ended up in the axesgrid documentation section now. Now the question is why AnchoredArtists are part of AxesGrid in the first place though...

  2. ImportanceOfBeingErnest commented on Apr 20, 2018

    Member

    Please do not remove any of the userdemo examples. They are... well, part of the userdemos. In this case, the annotation guide.

    I would also not recommend deleting any of the other two examples. They both make sense in the respecitve context. The one is an example of the anchored artists from axes_grid1, so it should be part of the axes_grid1 examples. The other shows how to do the same without axes_grid1. I would hence recommend to add some text to both examples explaining the context and also link to the respective other example.

  3. madphysicist commented on Apr 20, 2018

    ContributorAuthor

    @ImportanceOfBeingErnest Thanks. That is exactly the kind of guidance I was looking for. Would it be OK to edit the user example a bit?

  4. jklymak commented on Apr 20, 2018

    Member

    @madphysicist Any edits to the examples gratefully received if they help improve understanding!

  5. ImportanceOfBeingErnest commented on Apr 20, 2018

    Member

    The userdemo example should above all be quite short and make sense in the context of the annotations guide. What you definitely can do is bring the code in the annotations guide and the code from the example in accordance (they seem to be a bit off).

    Also feel free to adjust things like if True or if __name__ if that helps the example to be easier to understand.

    In general a little bit of explanations above or below the examples is always useful.

  6. madphysicist commented on Apr 20, 2018

    ContributorAuthor

    @ImportanceOfBeingErnest Besides the font and figure size, there are no significant differences between the annotations guide and the user example (once I undid my changes). What did you have in mind?

  7. ImportanceOfBeingErnest commented on Apr 20, 2018

    Member

    Figure size doesn't matter, because it's not in the userguide. But, yes, fontsize and linebreaks are different. And if you want to change loc=2 to loc="upper left" that should happen in both codes.

  8. story645 commented on Nov 17, 2022

    Member

    Some of those user demos can probably be removed since the figures in the annotation guide are generated in the guide directly as of #23606

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

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


      Back | FazBrowse Home | New Git URL