8000 [Bug]: Calling invert_yaxis() on a 3D plot inverts the xaxis · Issue #21843 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[Bug]: Calling invert_yaxis() on a 3D plot inverts the xaxis #21843
Closed
@baloe

Description

@baloe

Bug summary

Instead of inverting the yaxis, invert_yaxis actually has the same effect as invert_xaxis:

The demo code is derived from the demo here.

Code for reproduction

import matplotlib
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt

fig = plt.figure(figsize=(9,3.5), dpi=80)
ax1 = fig.add_subplot(141, projection='3d')
ax2 = fig.add_subplot(142, projection='3d')
ax3 = fig.add_subplot(143, projection='3d')
ax4 = fig.add_subplot(144, projection='3d')

fig.suptitle(f"matplotlib v{matplotlib.__version__}")

ax1.plot([1,1,10,10], [1,10,10,10], [1,1,1,10], marker="o")
ax2.plot([1,1,10,10], [1,10,10,10], [1,1,1,10], marker="o")
ax3.plot([1,1,10,10], [1,10,10,10], [1,1,1,10], marker="o")
ax4.plot([1,1,10,10], [1,10,10,10], [1,1,1,10], marker="o")

ax2.invert_xaxis()
ax3.invert_yaxis()
ax4.invert_zaxis()

plt.show()

Actual outcome

Figure_1

Expected outcome

Figure_edit
(well ... somewhat like this)

Additional information

This was worked on here, but apparently did not fix my issue, or am I missing something?
0e41317
#14579

Matplotlib Version

3.5.0

Installation

conda

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0