[Solved] How do I plot an 3D graph using x,y and z axis?


import csv
from pandas import read_csv
filename="Left.csv"
data = read_csv(filename)
print(data.shape)

#renaming existing columns
data.rename(columns={'epoc (ms)': 'epoc', 'timestamp (-04:00)': 'timestamp',
                 'elapsed (s)': 'elapsed' , 'x-axis (g)': 'xaxis',
                 'y-axis (g)' : 'yaxis' , 'z-axis (g)' : 'zaxis'}, 
inplace=True)

from matplotlib import pyplot
data.hist()
data.plot(kind='density', subplots=True, layout=(3,3), sharex=False)
from pandas.plotting import scatter_matrix
scatter_matrix(data)
pyplot.show()

X = dataset[: 4]
Y = dataset[: 5]
Z = dataset[: 6]

X, Y = np.meshgrid(xs, ys)
Z = generate(X, Y, 0.0)

import matplotlib.pyplot as plt
import time
wframe = None
tstart = time.time()
for phi in np.linspace(0, 360 / 2 / np.pi, 100):

oldcol = wframe

Z = generate(X, Y, phi)
wframe = ax.plot_wireframe(X, Y, Z, rstride=2, cstride=2)

# Remove old line collection before drawing
if oldcol is not None:
    ax.collections.remove(oldcol)

plt.draw()

solved How do I plot an 3D graph using x,y and z axis?