Привет график, приведенный здесь https://matplotlib.org/examples/axes_grid/demo_axisline_style.html
имеет метки на оси Y на правой стороне оси Y, но я хочу, чтобы они были на левой стороне оси Y,Как мне это сделать?
from mpl_toolkits.axes_grid.axislines import SubplotZero
from matplotlib.transforms import BlendedGenericTransform
import matplotlib.pyplot as plt
import numpy
if 1:
fig = plt.figure(1)
ax = SubplotZero(fig, 111)
fig.add_subplot(ax)
ax.axhline(linewidth=1.7, color="black")
ax.axvline(linewidth=1.7, color="black")
plt.xticks(range(11))
ax.text(0, 1.05, 'y', transform=BlendedGenericTransform(ax.transData, ax.transAxes), ha='center')
ax.text(1.05, 0, 'x', transform=BlendedGenericTransform(ax.transAxes, ax.transData), va='center')
for direction in ["xzero", "yzero"]:
ax.axis[direction].set_axisline_style("-|>")
ax.axis[direction].set_visible(True)
ax.axis["yzero"].set_visible(False)
for direction in ["right", "top"]:
ax.axis[direction].set_visible(False)
plt.yticks(range(11))
plt.grid(True)
plt.show()
Этот блок кода дает мне это.Но стрелка от оси Y отсутствует.