Skip to content

[Bug]: wspace and hspace in subfigures not working #25511

Closed
@maurosilber

Description

@maurosilber

Bug summary

wspace and hspace in Figure.subfigures do nothing.

Code for reproduction

import matplotlib.pyplot as plt

figs = plt.figure().subfigures(2, 2, wspace=0, hspace=0)
for fig in figs.flat:
    fig.subplots().plot([1, 2])
plt.show()

Actual outcome

Same figure independently of the values of hspace and wspace.

Expected outcome

wspace, hspace : float, default: None
The amount of width/height reserved for space between subfigures,
expressed as a fraction of the average subfigure width/height.
If not given, the values will be inferred from a figure or
rcParams when necessary.

Additional information

No response

Operating system

OS/X

Matplotlib Version

3.7.1

Matplotlib Backend

MacOSX

Python version

Python 3.10.9

Jupyter version

No response

Installation

conda

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions