8000 set_ylabel does not work as expected with SubplotZero · Issue #7617 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
set_ylabel does not work as expected with SubplotZero #7617
Closed
@tacaswell

Description

@tacaswell

Discovered as part of #7489

import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid.axislines import SubplotZero

fig = plt.figure()
ax = SubplotZero(fig, 111)
_ = fig.add_subplot(ax)


for direction in ["xzero", "yzero"]:
    ax.axis[direction].set_visible(True)
    ax.axis[direction].set_axisline_style("->")
    # Set outward ticks
    ax.axis[direction].major_ticks.set_tick_out(True)
    ax.axis[direction].minor_ticks.set_tick_out(True)

ax.axis["yzero"].set_axis_direction("left")

plt.plot([0,1], [0,1], c="blue", lw=2)
plt.xlabel('x')
plt.ylabel('y')

so

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0