Skip to content

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

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy