コード例 #1
0
 def plot3D(self, xs, ys, zs, *args, **kwargs):
     had_data = self.has_data()
     lines = Axes.plot(self, xs,ys, *args, **kwargs)
     if len(lines)==1:
         line = lines[0]
         art3d.wrap_line(line, zs)
     #
     self.auto_scale_xyz(xs,ys,zs, had_data)
     return lines
コード例 #2
0
    def plot(self, *args, **kwargs):
        had_data = self.has_data()

        zval = cbook.popd(kwargs, 'z', 0)
        zdir = cbook.popd(kwargs, 'dir', 'z')
        lines = Axes.plot(self, *args, **kwargs)
        #
        linecs = [art3d.Line2DW(l, z=zval, dir=zdir) for l in lines]
        #
        xs = lines[0].get_xdata()
        ys = lines[0].get_ydata()
        zs = [zval for x in xs]
        xs,ys,zs = art3d.juggle_axes(xs,ys,zs,zdir)
        #
        self.auto_scale_xyz(xs,ys,zs, had_data)
        #
        return linecs