plots dictionary''' # comparators = [] for plotName, plotInfo in plots.iteritems(): plotInfo['t1'] = tree1 plotInfo['t2'] = tree2 plotInfo['name1'] = a1 plotInfo['name2'] = a2 c = draw(**plotInfo) plotInfo.comparator = c def saveAll(plots, outdir='Out'): '''save all the plots in png format in outdir.''' os.mkdir(outdir) oldpwd = os.getcwd() os.chdir(outdir) for plot in plots.values(): plot.comparator.save() os.chdir(oldpwd) dir = Directory(outdir) if __name__ == '__main__': tree1, tree2, options = main() allplots = dict(plots_inclusive.items() + plots_J1.items() + plots_J2.items()) drawAll(allplots) saveAll(allplots, options.outdir)
plotInfo["t1"] = trees[a1] plotInfo["t2"] = trees[a2] plotInfo["name1"] = a1 plotInfo["name2"] = a2 print "WARNING ADDITIONAL WEIGHTING FACTOR APPLIED:", 5.0 / 4.75 # plotInfo['normalize'] = 5./4.75 c = draw(**plotInfo) plotInfo.comparator = c # comparators.append(c) def saveAll(plots, outdir="Out"): """save all the plots in png format in outdir.""" os.mkdir(outdir) oldpwd = os.getcwd() os.chdir(outdir) for plot in plots.values(): plot.comparator.save() os.chdir(oldpwd) dir = Directory(outdir) if __name__ == "__main__": trees, a1, a2, options = main() # allplots = dict(plots_inclusive.items() + plots_J1.items() + plots_J2.items()) allplots = plots_tt drawAll(allplots) saveAll(allplots, options.outdir)
"""create and draw the comparators corresponding to each of the plot info in the input plots dictionary""" # comparators = [] for plotName, plotInfo in plots.iteritems(): plotInfo["t1"] = tree1 plotInfo["t2"] = tree2 plotInfo["name1"] = a1 plotInfo["name2"] = a2 c = draw(**plotInfo) plotInfo.comparator = c def saveAll(plots, outdir="Out"): """save all the plots in png format in outdir.""" os.mkdir(outdir) oldpwd = os.getcwd() os.chdir(outdir) for plot in plots.values(): plot.comparator.save() os.chdir(oldpwd) dir = Directory(outdir) if __name__ == "__main__": tree1, tree2, options = main() allplots = dict(plots_inclusive.items() + plots_J1.items() + plots_J2.items()) drawAll(allplots) saveAll(allplots, options.outdir)