Я хочу установить выступ для стиля стрелки аннотации в matplotlib. Установка атрибута overhang
с использованием Axes.arrow()
работает с поиском, установка его в arrowprops
-атрибут Axes.annotate()
нет.
MWE:
import matplotlib.pyplot as plt
ax = plt.axes()
ax.arrow(0, 0, 0.5, 0.5, head_width=0.05, head_length=0.1, overhang=0.2)
ax.annotate(
"Test",
(0, 0.5),
(0.5, 0),
arrowprops=dict(arrowstyle="-|>,head_width=1.05, head_length=1"),
)
# # Fails:
# ax.annotate(
# "Test",
# (0, 0.5),
# (0.5, 0),
# arrowprops=dict(arrowstyle="-|>,head_width=1.05, head_length=1, overhang=1"),
# )
# # Fails:
# ax.annotate(
# "Test",
# (0, 0.5),
# (0.5, 0),
# arrowprops=dict(arrowstyle="-|>,head_width=1.05, head_length=1", overhang=1),
#
# )
# # Fails:
# ax.annotate(
# "Test",
# (0, 0.5),
# (0.5, 0),
# arrowprops=dict(arrowstyle="-|>,head_width=1.05, head_length=1"),
# overhang=1,
# )
plt.show()
Где и как можно Я установил атрибут overhang
?