def add_source(self, tag, m, x, y): s = Source(self.plot_canvas, tag, m, x, y) self.sources[tag] = s s.control(self.info_bar, self.object_counter) self.object_counter += 1 self.clear_streamlines() s.draw()
def toggle_add_source(self): self.set_mode("source") s = Source(self.plot_canvas, "temp", 1, 0, 0) self.sources["temp"] = s s.draw()
def add_source(self, tag, m, x, y): s = Source(self.plot, tag, m, x, y, ElementTypes["source"], self.watcher) self.__sources[tag] = s s.draw() return s