Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug]: ax.invert_xaxis() and ax.invert_yaxis() both flip the X axis #21369

Closed
@Mars-or-bust

Description

@Mars-or-bust

Bug summary

The ax.invertxaxis() and ax.invert_yaxis() function both produce the same output, a scatterplot with a flipped X axis.

Code for reproduction

from mpl_toolkits import mplot3d
import matplotlib.pyplot as plt

ax = plt.axes(projection='3d')
plt.title("Invert Z")
ax.scatter3D(1,1,1)
# ax.invert_xaxis()
ax.invert_yaxis()
# ax.invert_zaxis()

Actual outcome

No inversions:
Screen Shot 2021-10-15 at 1 52 25 PM

X Inversion:
Screen Shot 2021-10-15 at 1 52 48 PM

Y Inversion:
Screen Shot 2021-10-15 at 1 54 55 PM

Z Inversion behaves as expected:
Screen Shot 2021-10-15 at 1 56 10 PM

Expected outcome

I would expect the y axis to be inverted

Operating system

No response

Matplotlib Version

3.2.2

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Other libraries

mpl_toolkits.mplot3d

Installation

No response

Conda channel

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueOpen a pull request against these issues if there are no active ones!topic: mplot3d

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions