Description
I don't know if this is a bug in Jupyter/IPython or in Matplotlib ...
Bug report
Bug summary
When creating 3D plots (using Axes3D
) with the "inline" backend (which is the default) in a Jupyter notebook, the argument figsize
doesn't seem to work as intended. It looks like the width is ignored when calculating the figure size (but it doesn't seem to be ignored when calculating the size of the "axes" object?).
Actual outcome
First, when using fig.gca(projection='3d')
, which is used in the official Matplotlib examples:
The same thing happens when using fig.add_subplot(projection='3d')
:
Interestingly, a slightly different thing happens when using fig.add_axes([0, 0, 1, 1], projection='3d')
and Axes3D(fig)
(which is discouraged?):
Expected outcome
When using a "normal" 2D Axes
, it looks as expected:
The output from fig.add_axes([0, 0, 1, 1])
is also different in this case:
Matplotlib version
- Operating system: Debian Linux
- Matplotlib version:
master
- Matplotlib backend (
print(matplotlib.get_backend())
):module://ipykernel.pylab.backend_inline
- Python version: 3.7.6
- Jupyter version (if applicable): JupyterLab
master