Skip to content

[Doc]: Data parameter description is not always replaced #21135

Closed
@timhoffm

Description

@timhoffm

Documentation Link

https://matplotlib.org/devdocs/search.html?q=++++DATA_PARAMETER_PLACEHOLDER

Problem

Generating the data parameter description does not work properly for a number of functions

This search should be empty:
https://matplotlib.org/devdocs/search.html?q=++++DATA_PARAMETER_PLACEHOLDER

The replacement of this placeholder is done through the @_preprocess_data decorator. This does not work if

  • the function accepts data but does not use the decorator, because the resolution is deferrd; e.g. in semilogx
  • or if the docstring is added to the function afterwards, e.g. in quiver

Suggested improvement

Reformatting the docstring should be extracted into an isolated function(s)

@fill_data_parameter_placeholder
def semilogx():

and

def quiver():
    ....
quiver.__doc__ = fill_data_parameter_placeholder(QUIVER_DOC)

Matplotlib Version

3.5.x

Matplotlib documentation version

3.5.x

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions