def histogram_plot(data, sfreq, toffset, bins, log_scale, title):
"""Plot a histogram of the data for a given bin size."""
print("histogram")
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.hist(numpy.real(data), bins,
log=log_scale, histtype='bar', color=['green'])
ax.hold(True)
ax.hist(numpy.imag(data), bins,
log=log_scale, histtype='bar', color=['blue'])
ax.grid(True)
ax.set_xlabel('adc value')
ax.set_ylabel('frequency')
ax.set_title(title)
ax.hold(False)
return fig
评论列表
文章目录