def plot_simulation_results_initial_controls(time_points, y_sim):
pl.rc("text", usetex = True)
pl.rc("font", family="serif")
pl.subplot2grid((4, 2), (0, 0))
pl.plot(time_points, y_sim[:,0])
pl.title("Simulation results for initial controls")
pl.xlabel("t")
pl.ylabel("X", rotation = 0, labelpad = 20)
pl.subplot2grid((4, 2), (1, 0))
pl.plot(time_points, y_sim[:,1])
pl.xlabel("t")
pl.ylabel("Y", rotation = 0, labelpad = 15)
pl.subplot2grid((4, 2), (2, 0))
pl.plot(time_points, y_sim[:,2])
pl.xlabel("t")
pl.ylabel(r"\phi", rotation = 0, labelpad = 15)
pl.subplot2grid((4, 2), (3, 0))
pl.plot(time_points, y_sim[:,3])
pl.xlabel("t")
pl.ylabel("v", rotation = 0, labelpad = 20)
pl.subplot2grid((4, 2), (0, 1), rowspan = 4)
pl.plot(y_sim[:,0], y_sim[:, 1])
pl.title("Simulated race car path for initial controls")
pl.xlabel("X")
pl.ylabel("Y", rotation = 0, labelpad = 20)
pl.show()
评论列表
文章目录