You can create custom polygons using the keyword argument marker
and passing it a tuple of 3 numbers (number of sides, style, rotation)
.
To create a triangle you would use (3, 0, rotation)
, an example is shown below.
import matplotlib.pyplot as plt
x = [1,2,3]
for i in x:
plt.plot(i, i, marker=(3, 0, i*90), markersize=20, linestyle='None')
plt.xlim([0,4])
plt.ylim([0,4])
plt.show()
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…