Skip to content

Having section "Notes" twice does not raise a warning, but only renders once #64

Closed
@NelleV

Description

@NelleV

A lot of matplotlib's plotting function have a notes section concatenated to them at runtime. That leads to docstrings such as the following:

(from plt.imshow)

blah blah blah

See also
--------
matshow : Plot a matrix or an array as an image.

Notes
-----
Unless *extent* is used, pixel centers will be located at integer
coordinates. In other words: the origin will coincide with the center
of pixel (0, 0).

Examples
--------

.. plot:: mpl_examples/pylab_examples/image_demo.py

Notes
-----

In addition to the above described arguments, this function can take a
**data** keyword argument. If such a **data** argument is given, the
following arguments are replaced by **data[<arg>]**:

* All positional and all keyword arguments.

Additional kwargs: hold = [True|False] overrides default hold state
"""

The rendered docstring is here: http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.imshow
You can notice that the second "Notes" replaced the first one.
And it does this without raising a warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions