On Wednesday, November 23, 2011, Bala subramanian <bala.biophys...@gmail.com>
wrote:
> Hello,
> I am trying to make a wireframe plot with the x,y,z values in my data
(attached file). I get the following error which i dnt understand. Kindly
write me what is going wrong.
>
> Traceback (most recent call last):
>   File "test.py", line 14, in <module>
>     ax.plot_wireframe(d1,d2,d3)
>   File "/usr/lib/pymodules/python2.7/mpl_toolkits/mplot3d/axes3d.py",
line 687, in plot_wireframe
>     rows, cols = Z.shape
> ValueError: need more than 1 value to unpack
>
> I used is similar code as in the gallery.
>
> #!/usr/bin/env python
> import numpy as np
> from mpl_toolkits.mplot3d import Axes3D
> import matplotlib.pyplot as plt
>
> d1=np.loadtxt('test.dat',usecols=(0,))
> d2=np.loadtxt('test.dat',usecols=(1,))
> d3=np.loadtxt('test.dat',usecols=(2,))
>
> fig=plt.figure()
> ax = Axes3D(fig)
>
> ax.plot_wireframe(d1,d2,d3)
>
> Thanks,
> Bala
>
>

The data needs to be 2d.  I think the x and y can be 1d, so long as they
can be broadcasted together to the same shape as Z.

Ben Root
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to