def plot(self): l = self.tree.leaves() for leaf in l: print leaf.boundary(), leaf.error() plotfunc(self.f, *self.tree.boundary()) plottree(self.tree) plt.show() TreeGrapher([self.tree], "tree.pdf", unique=False, debug=False).graph()
def plot(self): l = self.tree_hp.leaves() dof = 0 for leaf in l: dof = dof + leaf._p print leaf._p, leaf.boundary(), leaf.error() print dof, self.tree_hp.sum_of_leaves() plotfunc(self.f, *self.tree.boundary()) plottree(self.tree_hp) plt.show() TreeGrapher([self.tree_hp], "tree_hp.pdf", unique=False, debug=True).graph() TreeGrapher([self.tree], "tree.pdf", unique=False, debug=True).graph()