Skip to content

[Doc]: Link API docs of pyplot wrappers to the corresponding Axes methods #23795

Closed
@anntzer

Description

@anntzer

Documentation Link

No response

Problem

The API docs for the pyplot plotting functions are not connected to the corresponding Axes methods. This means that, for example, there is no easy way to reach the fill_between examples at https://matplotlib.org/devdocs/api/_as_gen/matplotlib.pyplot.fill_between.html (which may be e.g. where google sends you to), whereas they are present at https://matplotlib.org/devdocs/api/_as_gen/matplotlib.axes.Axes.fill_between.html.

Suggested improvement

The easiest short-term solution may be to manually fix all backlink entries in examples to include both the Axes method and the pyplot wrapper, regardless of which one is actually showcased in the example.
OTOH it may be better to just merge the two API pages so e.g. Axes.fill_between and pyplot.fill_between are documented on the same page (as the contents are actually entirely identical) with both function names in the header (the function signature in bold). However this may require more fiddling with sphinx.

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