import matplotlib.pyplot as plt h,v0,g=3000,200,9.8 t=eval(input('t时间是')) xt=v0*t yt=h-1/2*g*t**2 plt.plot(xt,yt,'ro') plt.grid('on') plt.axis([0,2000,1,3000]) plt.show()