drf_plot.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:digital_rf 作者: MITHaystack 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号