Skip to content

Lost class descriptions since 3.4 docs #20583

Closed
@pp-mo

Description

@pp-mo

Problem

Key docstring information no longer appearing in v3.4 docs

Some class docstrings are omitted from the API pages,
making certain features virtually incomprehensible.

For instance ...

It seems that up to 3.3, the class matplotlib.colors.SymLogNorm had a nice description,
https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.colors.SymLogNorm.html
But it has since vanished.
https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.SymLogNorm.html#matplotlib.colors.SymLogNorm

All this key description is missing ...

The symmetrical logarithmic scale is logarithmic in both the positive and negative directions from the origin.
Since the values close to zero tend toward infinity, there is a need to have a range around zero that is linear. The parameter linthresh allows the user to specify the size of this range (-linthresh, linthresh).

linthresh: The range within which the plot is linear (to avoid having the plot go to infinity around zero).

linscale: This allows the linear range (-linthresh to linthresh) to be stretched relative to the logarithmic range. Its value is the number of decades to use for each half of the linear range. For example, when linscale == 1.0 (the default), the space used for the positive and negative halves of the linear range will be equal to one decade in the logarithmic range. Defaults to 1.

This occurs also for other classes, and not just in this module :
E.G. matplotlib.collections.RegularPolyCollection :
https://matplotlib.org/stable/api/collections_api.html?highlight=circumscribing#matplotlib.collections.RegularPolyCollection
( old version : https://matplotlib.org/3.1.1/api/collections_api.html#matplotlib.collections.RegularPolyCollection )
And this one is, I think, very important descriptive information that is no longer available

but certainly not all of them, e.g. LinearSegmentedColormap
https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.LinearSegmentedColormap.html#matplotlib.colors.LinearSegmentedColormap
(which is fine)

In fact, this last one is interesting, because it shows that the class docstring and the __init__ docstring have been combined into a single paragraph.
This leads me to guess that, just maybe, nothing appears when the class has a class docstring but no __init__ docstring.

I have tried to understand at what point this went wrong,
but unfortunately it's all rather beyond my understanding of Sphinx and schemes.

Suggested Improvement

Need to re-instate the missing docstring descriptions into the API documentation build.

Matplotlib version

  • Operating system: linux
  • Matplotlib version : -
  • Matplotlib documentation version (is listed under the logo): 3.4.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions