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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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