Closed
Description
Bug report
In Matplotlib 3.2.0, creating a figure of size (0, 0) raises an error.
Code for reproduction
import matplotlib.pyplot as plt
fig = plt.figure(figsize=(0,0))
Actual outcome
Traceback (most recent call last):
File "test_mpl.py", line 3, in <module>
fig = plt.figure(figsize=(0,0))
File "/Users/kkolman/anaconda3/envs/sift/lib/python3.7/site-packages/matplotlib/pyplot.py", line 546, in figure
**kwargs)
File "/Users/kkolman/anaconda3/envs/sift/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 3324, in new_figure_manager
fig = fig_cls(*args, **kwargs)
File "/Users/kkolman/anaconda3/envs/sift/lib/python3.7/site-packages/matplotlib/figure.py", line 349, in __init__
raise ValueError('figure size must be positive finite not '
ValueError: figure size must be positive finite not (0, 0)
Expected outcome
The code above used to not raise an error in the previous version of matplotlib.
Matplotlib version
- Operating system: macOS 10.14.6
- Matplotlib version: 3.2.0
- Matplotlib backend (
print(matplotlib.get_backend())
): MacOSX - Python version: 3.7.6
Matplotlib installation:
conda install -c conda-forge matplotlib
cc @djhoese
Metadata
Metadata
Assignees
Labels
No labels