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]: 3D bar chart appears over axis when using zlim #29482

Open
@XrioBtw

Description

@XrioBtw

Bug summary

When I make a 3D bar chart with Matplotlib and change the z axis limits usingax.set_zlim(newMin, newMax) the part of the bar charts below the new z axis minimum value appears above the x and y axis. I would like to ensure that the x and y axis always renders at the top, but I don't know how to achieve this. I triedax.set_zorder(bigNumber) andax.xaxis.set_zorder(bigNumber), but it didn't change anything.

Code for reproduction

fig,ax=plt.subplots(subplot_kw= {"projection" :"3d"})ax.bar3d([1,1,2,2], [1,2,1,2],0,1,1, [2,3,1,4])ax.set_zlim(2,4)ax.set_zorder(10000000)# does not helpplt.show()

Actual outcome

The actual outcome looks like this, where the bar charts render over the x and y axis:

actual-outcome

Expected outcome

Either left or right would be expected outcome:

expected-outcome

Additional information

No response

Operating system

Windows

Matplotlib Version

3.6.0

Matplotlib Backend

TkAgg

Python version

3.10.6

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp