python matplotlib.stem不带标记的阴谋

python matplotlib.stem不带标记的阴谋

问题描述:

如何绘制没有标记的蒸汽阴谋(只有蒸汽线)?绘制非常长的信号阵列时,它特别有用。python matplotlib.stem不带标记的阴谋

谢谢!

+0

你有任何的代码?你能提供一个例子和一些数据吗? – Ffisegydd 2014-09-25 15:46:53

你可以简单地设置标记是什么:

enter image description here

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使用“无”作为标记,每个给出了略有不同的结果。例如,使用""代替" "将所述杆的端部与线路连接:

enter image description here

另外,顺便说一句,我首先使用像素标记,通过","指定尝试过,但该像素结束了不与茎干对齐,看起来不太好。

+0

正是我需要的。非常感谢!! – LuiSlow 2014-09-26 19:11:27