I am trying to draw a colored mesh plot of a travelling wave like this (just ignore the grey background):
I am looking at the example shown in How to obtain 3D colored surface via Python?, but I'm not sure how to adapt it for my function z:
from mpl_toolkits.mplot3d import axes3d, art3d
import matplotlib.pyplot as plt
import numpy as np
import matplotlib as mpl
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
X = T = np.arange(0,10,0.1)
z = np.array([np.cos(2*np.pi*(x/3.0-t/6.0)) for x,t in zip(np.ravel(X), np.ravel(T))])
Z = z.reshape(X.shape)
#X, Y, Z = axes3d.get_test_data(0.05)
wire = ax.plot_wireframe(X, T, Z, rstride=10, cstride=10)