filter.py 文件源码

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

项目:picasso 作者: jungmannlab 项目源码 文件源码
def plot(self):
        # Prepare the data
        data = self.locs[self.field]
        data = data[np.isfinite(data)]
        bins = lib.calculate_optimal_bins(data, 1000)
        # Prepare the figure
        self.figure.clear()
        self.figure.suptitle(self.field)
        axes = self.figure.add_subplot(111)
        axes.hist(data, bins, rwidth=1, linewidth=0)
        data_range = data.ptp()
        axes.set_xlim([bins[0] - 0.05*data_range, data.max() + 0.05*data_range])
        self.span = SpanSelector(axes, self.on_span_select, 'horizontal', useblit=True, rectprops=dict(facecolor='green', alpha=0.2))
        self.canvas.draw()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号