如何在matplotlib中偏移标记?

3
plt.plot([2,5],[0,0], marker='^', markersize= 15, fillstyle='none')

enter image description here

什么是让标记下降一点以使线接触三角形顶部的最简单方法?
我试图绘制一个梁,就像下面的图片一样,但我甚至无法正确放置标记。enter image description here
1个回答

5

有一种填充标记,参见标记文档

plt.plot([2,5],[0.3,0.3], marker=6, markersize= 15, fillstyle='full')

enter image description here

enter image description here


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接