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

Axes3d attaches itself to a figure, where asAxes does not #18364

Closed
@jklymak

Description

@jklymak
importmatplotlib.pyplotaspltimportmatplotlib.axesasmaxesfig=plt.figure()ax=maxes.Axes(fig, [0.1,0.1,0.9,0.9])print(fig.get_children())

returns a list with no axes....

[<matplotlib.patches.Rectangle object at 0x7f8d75707dc0>]

For 3-d

importmatplotlib.pyplotaspltimportmatplotlib.axesasmaxesfrommpl_toolkits.mplot3dimportAxes3Dfig=plt.figure()ax=Axes3D(fig)print(fig.get_children())

has the axes attached:

[<matplotlib.patches.Rectangle object at 0x7fbc2968d160>, <mpl_toolkits.mplot3d.axes3d.Axes3D object at 0x7fbc2968df40>]

Axes3D.__init__ explicitly adds itself to its parent:

self.figure.add_axes(self)

whereas no such thing happens for the baseAxes class.

Discovered as part of#18356, but discussing here because its orthogonal. But I think the behaviour here should be the same .

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