Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug summary
When creating a 3D plot usingadd_collection3d
, the view limits are not automatically updated like in other plot functions.
Possibly related to#14298.
Code for reproduction
importmatplotlib.pyplotaspltimportmatplotlib.collectionsimportnumpyasnpfig,ax=plt.subplots(1,1,figsize=(7,4),constrained_layout=True,subplot_kw=dict(projection='3d',proj_type='ortho'))xy=np.array([[(0,0), (0.5,100), (1,0)]])ax.add_collection3d(matplotlib.collections.LineCollection(xy))# Manually update view limits# ax.auto_scale_xyz(xy[..., 0], xy[..., 1], None, ax.has_data())plt.show()
Actual outcome
Expected outcome
Produced by uncommenting the line of code below# Manually update view limits
.
Additional information
I'm using matplotlib 3.5.0, but the relevant code does not seem to callauto_scale_xyz
like the other plot functions in the 3.5.2 branch or the main branch.
Operating system
Window 10
Matplotlib Version
3.5.0
Matplotlib Backend
module://matplotlib_inline.backend_inline
Python version
Python 3.9.9
Jupyter version
3.4.3
Installation
pip