PeakFinder.py 文件源码

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

项目:PyPeVoc 作者: goiosunsw 项目源码 文件源码
def plot(self, logarithmic=False):
        """Plot a graphical representation of the peaks

        Arguments:
            (none)
        """

        import pylab as pl

        pl.figure()
        pl.plot(self.x)
        pl.hold('on')
        pl.plot(self.pos[self.keep], self.val[self.keep], 'og')
        pl.plot(self.pos[np.logical_not(self.keep)],
                self.val[np.logical_not(self.keep)], 'om')
        if hasattr(self, 'bounds'):
            lmins = np.unique(self.bounds.flatten())
            lminvals = self.x[lmins]
            pl.plot(lmins, lminvals, 'or')
        if hasattr(self, 'fpos'):
            pl.plot(self.fpos[self.keep], self.fval[self.keep], 'dg')
        pl.hold('off')
        if logarithmic:
            pl.gca().set_yscale('log')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号