I am trying to generate a 3D histogram using python. I tried the following code but I am getting an error too many values to unpack.
from matplotlib import pyplot
import pylab
from mpl_toolkits.mplot3d import Axes3D
import numpy
fig = pylab.figure()
ax = Axes3D(fig)
data_filename = 'C:\csvfiles\luxury.txt'
data_file = numpy.loadtxt(data_filename, delimiter=',')
X = data_file[:,1]
Y = data_file[:,2]
Z = data_file[:,3]
ax.hist(X, Y, Z)
pyplot.show()
What am I doing wrong?