python matplotlib.stem不带标记的阴谋
答
你可以简单地设置标记是什么:
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 6*np.pi, 200)
y = np.sin(x)
plt.stem(x, y, markerfmt=" ")
plt.show()
在matplotlib,有a few ways使用“无”作为标记,每个给出了略有不同的结果。例如,使用""
代替" "
将所述杆的端部与线路连接:
另外,顺便说一句,我首先使用像素标记,通过","
指定尝试过,但该像素结束了不与茎干对齐,看起来不太好。
+0
正是我需要的。非常感谢!! – LuiSlow 2014-09-26 19:11:27
你有任何的代码?你能提供一个例子和一些数据吗? – Ffisegydd 2014-09-25 15:46:53