Exemplo n.º 1
0
    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]
Exemplo n.º 2
0
    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]