Exemplo n.º 1
0
    def new_plot(self, undolist=None):
        " Returns a new Plot. "
        if undolist is None:
            undolist = self.journal
        
        new_plot = new_lineplot2d()
        new_plot.key = pdict.unique_key(self.plots, "new lineplot2d")
        self.add_plot(new_plot)
        ui = UndoInfo(self.remove_plot, new_plot).describe("New Plot")
        undolist.append(ui)

        self.sig_emit("notify::plots")
        
        return new_plot    
 def _cb_new_plot(self,widget):
     pj = self._check_project()
     
     plot = new_lineplot2d(key='empty plot')
     pj.add_plots([plot])