Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]:add_collection3d does not update view limits #23317

Closed
Milestone
@Qrox

Description

@Qrox

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

image

Expected outcome

Produced by uncommenting the line of code below# Manually update view limits.

image

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp