行右端标记的旋转和转动
Rotation and turning of marker on right end of line
在 Matplotlib
中有一行分配标记结束。如何在一端旋转和转动标记符号。
带有标记的当前行。
带标记结束的通缉线
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
fig = plt.figure()
ax = fig.add_subplot(111, aspect='equal')
linea = Line2D((0.1, 0.9), (0.5, 0.5), linewidth=10, color="fuchsia",
alpha=0.6, marker='$∖$', markersize=20)
ax.add_line(linea)
plt.show()
您总是可以分别绘制线条和标记:
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
fig = plt.figure()
ax = fig.add_subplot(111, aspect='equal')
line = ((0.1, 0.5, 0.9), (0.5, 0.7, 0.5))
linea = Line2D(*line, linewidth=10, color="fuchsia", alpha=0.6)
ax.add_line(linea)
ax.plot(line[0][:-1], line[1][:-1], ls="", color="fuchsia", alpha=0.6,
marker='$∖$', markersize=30)
ax.plot(line[0][-1], line[1][-1], ls="", color="fuchsia", alpha=0.6,
marker='$/$', markersize=30)
在 Matplotlib
中有一行分配标记结束。如何在一端旋转和转动标记符号。
带有标记的当前行。
带标记结束的通缉线
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
fig = plt.figure()
ax = fig.add_subplot(111, aspect='equal')
linea = Line2D((0.1, 0.9), (0.5, 0.5), linewidth=10, color="fuchsia",
alpha=0.6, marker='$∖$', markersize=20)
ax.add_line(linea)
plt.show()
您总是可以分别绘制线条和标记:
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
fig = plt.figure()
ax = fig.add_subplot(111, aspect='equal')
line = ((0.1, 0.5, 0.9), (0.5, 0.7, 0.5))
linea = Line2D(*line, linewidth=10, color="fuchsia", alpha=0.6)
ax.add_line(linea)
ax.plot(line[0][:-1], line[1][:-1], ls="", color="fuchsia", alpha=0.6,
marker='$∖$', markersize=30)
ax.plot(line[0][-1], line[1][-1], ls="", color="fuchsia", alpha=0.6,
marker='$/$', markersize=30)