4

I am currently modifying the xdata and ydata properties for a Line2D object like so:

plt.setp(ph, xdata=event.xdata,ydata=event.ydata);
thisline.figure.canvas.draw();

I would like to do the same thing for a surface plot of type Poly3DCollection, however, Poly3DCollection doesn't have a zdata property, so

plt.setp(surf,zdata=z_surface);

doesn't work. At the moment, I'm re-creating the plot using plot_surface, but it's very slow and creates other issues. Is there a better say of doing this? I want to change the plot zdata in real time.

stanri
  • 2,922
  • 3
  • 25
  • 43
  • 1
    try `set_data` or `set_path` or `set_verts`, see the docs (http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/api.html#mpl_toolkits.mplot3d.art3d.Poly3DCollection) for more info. As you've not provided a runnable example, it's hard to advice further – ev-br Jun 12 '12 at 16:29

0 Answers0