def generate_artist(self, *args, **kywds): # print 'entering fig_grp:: generate_artist' for name, child in self.get_children(): if child._suppress: child.del_artist(delall=True) else: child.generate_artist(*args, **kywds) ax = self.get_figaxes() c = self.get_container() if self.isempty(): a = Rectangle((0,0), 1, 1, facecolor='none', fill=False, edgecolor='none', alpha=0) a.figobj=self a.figobj_hl=[] self._artists = [a] c.patches.append(a) if ax is not None and ax.get_3d(): import mpl_toolkits.mplot3d.art3d as art3d art3d.patch_2d_to_3d(a) figure = self.get_figpage()._artists[0] a.set_figure(figure) if self.get_figaxes() is not None: if len(self.get_figaxes()._artists) != 0: a.axes = self.get_figaxes()._artists[0]
def make_newartist(self): self.check_loaded_gp_data() x1, y1 = self.get_gp(0).get_device_point() x2, y2 = self.get_gp(1).get_device_point() xy = (min([x1, x2]), min([y1, y2])) w = abs(x1 - x2) h = abs(y1 - y2) if self.getp('isotropic'): if w < h: h = w else: w = h a = Rectangle(xy, w, h, facecolor='none', fill=False, edgecolor='black', alpha=1) lp = self.getp("loaded_property") if lp is not None: self.set_artist_property(a, lp[0]) self.delp("loaded_property") a.figobj = self a.figobj_hl = [] a.set_zorder(self.getp('zorder')) a._is_frameart = self.getp('frameart') return a
def generate_artist(self, *args, **kywds): # print 'entering fig_grp:: generate_artist' for name, child in self.get_children(): if child._suppress: child.del_artist(delall=True) else: child.generate_artist(*args, **kywds) ax = self.get_figaxes() c = self.get_container() if self.isempty(): a = Rectangle((0, 0), 1, 1, facecolor='none', fill=False, edgecolor='none', alpha=0) a.figobj = self a.figobj_hl = [] self._artists = [a] c.patches.append(a) if ax is not None and ax.get_3d(): import mpl_toolkits.mplot3d.art3d as art3d art3d.patch_2d_to_3d(a) figure = self.get_figpage()._artists[0] a.set_figure(figure) if self.get_figaxes() is not None: if len(self.get_figaxes()._artists) != 0: a.axes = self.get_figaxes()._artists[0]
def make_newartist(self): self.check_loaded_gp_data() x1, y1=self.get_gp(0).get_device_point() x2, y2=self.get_gp(1).get_device_point() xy = (min([x1, x2]), min([y1,y2])) w = abs(x1-x2) h = abs(y1-y2) if self.getp('isotropic'): if w<h: h=w else: w=h a = Rectangle(xy, w, h, facecolor='none', fill=False, edgecolor='black', alpha=1) lp=self.getp("loaded_property") if lp is not None: self.set_artist_property(a, lp[0]) self.delp("loaded_property") a.figobj=self a.figobj_hl=[] a.set_zorder(self.getp('zorder')) a._is_frameart = self.getp('frameart') return a