I wish to create a small square figure - 1x1 inch.
import matplotlib.pyplot as plt
fig = plt.figure(figsize=[1,1])
plt.show()
If I evaluate fig, it returns
<Figure size 100x100 with 0 Axes>.
However, on the screen, a rectangular figure is displayed:
How do I generate a figure with a square canvas? And why the code above generates this elongated canvas, isn't figsize defined in inches? What am I missing?
(This is Matplotlib 3.5.3, TkAgg, on Ubuntu)
EDIT: Bigger square figures (e.g., 3x3 inch) are displayed correctly as squared figures on the screen. However, it seems that matplotlib applies some heuristic that makes the figure at least 2.7 inches wide.
EDIT 2: A related GitHub issue, no working solution: https://github.com/matplotlib/matplotlib/issues/2716

