I want to simulate the position of a tennis ball in a 3D plot. It want it to be a line equal to the tennis ball's position on a tennis court after it has been hit. The problem is that my code plots a blue figure instead go a line as shown in the link below. What do I do to make it a blue line?
In addition, I get an error:
TypeError: plot() missing 3 required positional arguments: 'self', 'xs', and 'ys'
I don't know how it affects the result of my code though
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
x=np.array([0,3,5,7,9,11,13,15,17,19,21,23])
y=np.array([0,0.1,0.2,0.3,0.4,0.6,0.9,1,1.2,1.4,1.7,1.9])
z=np.array([1,1.2,1.5,1.7,1.8,1.9,2,1.9,1.8,1.7,1.5,1.2])
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_trisurf(x,y,z,)
plt.show()
Axes3D.plot()
I expect the result to be a blue line instead of a blue figure as you see in the figure below