当我试图在for循环中获取直方图时,我似乎遇到了一个问题。我的代码如下:
for i in channel_list:
ch = int(i)
channel_data = buf.getChannelData(ch)
time_seq = buf.getTimeSequence(0.0)
#specify the parameters here:
aveChannel_data = np.mean(channel_data[0:100])
calChannel_data = channel_data - aveChannel_data
channel, up, low, mid, before, after= self.drop_time(ch,calChannel_data)
fall_time = time_seq[low]- time_seq[before]
rise_time = time_seq[after] - time_seq[low]
plt.hist(fall_time, bins = 30)
但我得到的结果是:
似乎每一次迭代,新数据都会被绘制在旧数据上。在
有什么办法解决这个问题吗?在
目前没有回答
相关问题 更多 >
编程相关推荐