Skip to content

[Doc]: misleading diagram in matplotlib.figure.Figure.subplots_adjust #30182

Closed as duplicate
@slintz

Description

@slintz

Documentation Link

https://matplotlib.org/stable/api/_as_gen/matplotlib.figure.Figure.subplots_adjust.html#matplotlib-figure-figure-subplots-adjust

Problem

A (naive) reading of the diagram indicates that the "right" parameter measures from the outer right edge to the right-most edge of the sub-plots. In fact, the correct measure is from the outer left edge to the right-most edge of the sub-plots.

|     [     ]  [     ]<-(right)->|  # I find this is misleading
|<-------right------>            |  # This is clearer to me

The text description of the parameters does nothing to clarify this distinction.

A similar issue occurs for "top" which is actually a measure from the outer bottom edge to the top-most edge of the sub-plots.

Suggested improvement

  1. Fix the image so that the "right" measurement indication aligns with how the rendering actually works. Same for "top".
  2. Adjust the text descriptions to align with the actual rendering, including a note that "left cannot be larger than right" (and "bottom cannot be larger than top")

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