コード例 #1
0
 def draw3d(self, renderer):
     xs,ys = zip(*self._offsets)
     xs,ys,zs = juggle_axes(xs,ys,self.zs,self.dir)
     if 0:
         vxs,vys,vzs,vis = proj3d.proj_transform_clip(xs,ys,zs, renderer.M)
         # mess with colors
         #
         vxs = [x for x,i in zip(vxs,vis) if i]
         vys = [y for y,i in zip(vys,vis) if i]
     else:
         vxs,vys,vzs,vis = proj3d.proj_transform_clip(xs,ys,zs, renderer.M)
     self._facecolors = zalpha(self._facecolors,vzs)
     self._edgecolors = zalpha(self._edgecolors,vzs)
     self._offsets = zip(vxs,vys)
     self.draw2d(renderer)
コード例 #2
0
 def do_3d_projection(self, renderer):
     s = self._segment3d
     xs, ys, zs = zip(*s)
     vxs, vys,vzs, vis = proj3d.proj_transform_clip(xs, ys, zs, renderer.M)
     self._path2d = mpath.Path(zip(vxs, vys))
     self._facecolor2d = self._facecolor3d
     return min(vzs)
コード例 #3
0
ファイル: art3d.py プロジェクト: stefanor/matplotlib
 def do_3d_projection(self, renderer):
     s = self._segment3d
     xs, ys, zs = zip(*s)
     vxs, vys, vzs, vis = proj3d.proj_transform_clip(xs, ys, zs, renderer.M)
     self._path2d = mpath.Path(zip(vxs, vys), self._code3d)
     # FIXME: coloring
     self._facecolor2d = self._facecolor3d
     return min(vzs)
コード例 #4
0
 def do_3d_projection(self, renderer):
     xs, ys, zs = self._offsets3d
     vxs, vys, vzs, vis = proj3d.proj_transform_clip(xs, ys, zs, renderer.M)
     self._alpha = None
     self.set_facecolors(zalpha(self._facecolor3d, vzs))
     self.set_edgecolors(zalpha(self._edgecolor3d, vzs))
     PatchCollection.set_offsets(self, zip(vxs, vys))
     return min(vzs)
コード例 #5
0
ファイル: art3d.py プロジェクト: jtomase/matplotlib
 def draw3d(self, renderer):
     xs, ys = zip(*self._offsets)
     xs, ys, zs = juggle_axes(xs, ys, self.zs, self.dir)
     if 0:
         vxs, vys, vzs, vis = proj3d.proj_transform_clip(
             xs, ys, zs, renderer.M)
         # mess with colors
         #
         vxs = [x for x, i in zip(vxs, vis) if i]
         vys = [y for y, i in zip(vys, vis) if i]
     else:
         vxs, vys, vzs, vis = proj3d.proj_transform_clip(
             xs, ys, zs, renderer.M)
     self._facecolors = zalpha(self._facecolors, vzs)
     self._edgecolors = zalpha(self._edgecolors, vzs)
     self._offsets = zip(vxs, vys)
     self.draw2d(renderer)
コード例 #6
0
ファイル: art3d.py プロジェクト: stefanor/matplotlib
    def do_3d_projection(self, renderer):
        xs, ys, zs = self._offsets3d
        vxs, vys, vzs, vis = proj3d.proj_transform_clip(xs, ys, zs, renderer.M)
        #FIXME: mpl allows us no way to unset the collection alpha value
        self._alpha = None
        self.set_facecolors(zalpha(self._facecolor3d, vzs))
        self.set_edgecolors(zalpha(self._edgecolor3d, vzs))
        PatchCollection.set_offsets(self, zip(vxs, vys))

        return min(vzs)
コード例 #7
0
 def draw3d(self, renderer):
     xs,ys = zip(*self.get_verts())
     xs,ys,zs = juggle_axes(xs,ys,self.zs,self.dir)
     vxs,vys,vzs,vis = proj3d.proj_transform_clip(xs,ys,zs, renderer.M)
     def get_verts(*args):
         verts = zip(vxs,vys)
         return verts
     
     self.get_verts = get_verts
     self.draw2d(renderer)
コード例 #8
0
ファイル: art3d.py プロジェクト: jtomase/matplotlib
    def draw3d(self, renderer):
        xs, ys = zip(*self.get_verts())
        xs, ys, zs = juggle_axes(xs, ys, self.zs, self.dir)
        vxs, vys, vzs, vis = proj3d.proj_transform_clip(xs, ys, zs, renderer.M)

        def get_verts(*args):
            verts = zip(vxs, vys)
            return verts

        self.get_verts = get_verts
        self.draw2d(renderer)
コード例 #9
0
 def draw3d(self, renderer):
     vverts = []
     for zs,verts in zip(self.zs,self._verts):
         xs,ys = zip(*verts)
         xs,ys,zs = juggle_axes(xs,ys,zs,self.dir)
         vxs,vys,vzs,vis = proj3d.proj_transform_clip(xs,ys,zs, renderer.M)
         vverts.append((max(vzs),zip(vxs,vys)))
     vverts.sort()
     vverts.reverse()
     # mess with colors
     self._verts = [verts for (z,verts) in vverts]
     self.draw2d(renderer)
コード例 #10
0
ファイル: art3d.py プロジェクト: jtomase/matplotlib
 def draw3d(self, renderer):
     vverts = []
     for zs, verts in zip(self.zs, self._verts):
         xs, ys = zip(*verts)
         xs, ys, zs = juggle_axes(xs, ys, zs, self.dir)
         vxs, vys, vzs, vis = proj3d.proj_transform_clip(
             xs, ys, zs, renderer.M)
         vverts.append((max(vzs), zip(vxs, vys)))
     vverts.sort()
     vverts.reverse()
     # mess with colors
     self._verts = [verts for (z, verts) in vverts]
     self.draw2d(renderer)
コード例 #11
0
ファイル: art3d.py プロジェクト: AdamHeck/matplotlib
    def do_3d_projection(self, renderer):
        xs, ys, zs = self._offsets3d
        vxs, vys, vzs, vis = proj3d.proj_transform_clip(xs, ys, zs, renderer.M)
        #FIXME: mpl allows us no way to unset the collection alpha value
        self._alpha = None
        self.set_facecolors(zalpha(self._facecolor3d, vzs))
        self.set_edgecolors(zalpha(self._edgecolor3d, vzs))
        PatchCollection.set_offsets(self, zip(vxs, vys))

        if vzs.size > 0 :
            return min(vzs)
        else :
            return np.nan