Skip to content

[Doc]: Improve animation.FuncAnimation.save - link parent methods in child's method documentation #24150

Closed

Description

@kwsp

Documentation Link

https://matplotlib.org/stable/api/_as_gen/matplotlib.animation.FuncAnimation.html

Problem

In https://matplotlib.org/stable/api/_as_gen/matplotlib.animation.FuncAnimation.html, the documentation of save is very incomplete. This is because save is a method inherited from the parent animation.Animation.

Suggested improvement

I think it would be extremely helpful to have a link to the parent's save method from animation.FuncAnimation's documentation base, as currently I don't think there is a straightforward way to find that documentation. I actually had to go to the source code of FuncAnimation, and follow up its inheritance tree to find where save was defined, then either read the docstring or find the corresponding method in the online documentation.

To extend this further - it would be helpful for all subclasses to have proper links to a parent method's documentation when the method isn't modified in the child.

Activity

  1. changed the title [-][Doc]: Improve animation.FuncAnimation.save[/-] [+][Doc]: Improve animation.FuncAnimation.save - link parent methods in child's method documentation[/+] on Oct 12, 2022
  2. oscargus commented on Oct 14, 2022

    @oscargus
    Member

    There is often a Bases section which shows the parent classes, but this seems to be missing from the animation classes. In TimedAnimation this has been solved by explicitly mentioning the parent class https://matplotlib.org/stable/api/_as_gen/matplotlib.animation.TimedAnimation.html

    While, of course, the best solution is to get the inheritance documentation working, a simple step to partly remedy this would be to do something similar.

  3. kwsp commented on Oct 14, 2022

    @kwsp
    ContributorAuthor

    I see. For now, I think we should specify that FuncAnimation is a subclass of TimedAnimation, then users can follow the docs up the inheritance tree to find the documentation for inherited methods.

    I can try to investigate how we can get inheritance documentation working

  4. added this to the v3.6.2 milestone on Mar 21, 2023
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions