Skip to content

fix y axis on 3d plot #21424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ def __init__(
self.set_axis_on()
self.M = None

# Change the y-axis ticks to be on the right side
self.yaxis.set_ticks_position("right")

# func used to format z -- fall back on major formatters
self.fmt_zdata = None

Expand Down
8 changes: 4 additions & 4 deletions lib/mpl_toolkits/mplot3d/axis3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def tick_update_position(tick, tickxs, tickys, labelpos):
tick.gridline.set_data(0, 0)


class Axis(maxis.XAxis):
class Axis(maxis.Axis):
"""An Axis class for the 3D plots."""
# These points from the unit cube make up the x, y and z-planes
_PLANES = (
Expand Down Expand Up @@ -516,21 +516,21 @@ def v_interval(self, minmax):
# Use classes to look at different data limits


class XAxis(Axis):
class XAxis(Axis, maxis.XAxis):
get_view_interval, set_view_interval = maxis._make_getset_interval(
"view", "xy_viewLim", "intervalx")
get_data_interval, set_data_interval = maxis._make_getset_interval(
"data", "xy_dataLim", "intervalx")


class YAxis(Axis):
class YAxis(Axis, maxis.YAxis):
get_view_interval, set_view_interval = maxis._make_getset_interval(
"view", "xy_viewLim", "intervaly")
get_data_interval, set_data_interval = maxis._make_getset_interval(
"data", "xy_dataLim", "intervaly")


class ZAxis(Axis):
class ZAxis(Axis, maxis.XAxis):
get_view_interval, set_view_interval = maxis._make_getset_interval(
"view", "zz_viewLim", "intervalx")
get_data_interval, set_data_interval = maxis._make_getset_interval(
Expand Down