如何在matplotlib中偏移标记?

时间:2017-05-20 07:52:50

标签: python matplotlib plot offset markers

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

enter image description here

让标记稍微下降以使线条接触三角形顶部的最简单方法是什么?

我正在尝试绘制一个光束,就像下面的图像,但我甚至无法将标记放在右边 enter image description here

1 个答案:

答案 0 :(得分:4)

有一个但有填充标记,请参阅marker doc

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

enter image description here

enter image description here