casiopeia_demo.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:casiopeia 作者: adbuerger 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号