angles.py 文件源码

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

项目:AdK_analysis 作者: orbeckst 项目源码 文件源码
def plot_windows_together(db,figname=os.path.join(config.basedir,'figs','pmf','windows.pdf'),stride=10,**plotargs):
    """Plot windows in one plot; stride selects a subset of windows.

    Example:

    >>> PMF.angles.plot_windows_together(db,figname='figs/pmf/all_windows.png',stride=1,alpha=0.3,contour_alpha=0.2,cmap=cm.jet_r)
    """
    import pylab

    pylab.clf()

    fn = db.filenames()[::stride]
    for n,f in enumerate(fn):
        fb = os.path.basename(f)
        print "-- %5.1f%% %3d/%3d %s" % (100*(n+1)/len(fn), n, len(fn), fb)
        # figname=os.path.join('figs','pmf',fb+'.pdf'),
        s = Selection(db,'filename="%s"' % f)
        s.plot(clf=False,**plotargs)
    pylab.title('Umbrella windows')
    pylab.savefig(str(figname))
    print "- Created figure '%(figname)s'." % vars()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号