quadPlot.py 文件源码

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

项目:quadcopter-simulation 作者: hbd730 项目源码 文件源码
def plot_quad_3d(args=()):
    fig = plt.figure()
    ax = fig.add_axes([0, 0, 1, 1], projection='3d')
    ax.plot([], [], [], '-', c='cyan')[0]
    ax.plot([], [], [], '-', c='red')[0]
    ax.plot([], [], [], '-', c='blue', marker='o', markevery=2)[0]
    set_limit((-0.5,0.5), (-0.5,0.5), (-0.5,5))
    an = animation.FuncAnimation(fig, _callback, fargs = args, init_func=None,
            frames=400, interval=10, blit=False)
    if len(sys.argv) > 1 and sys.argv[1] == 'save':
        an.save('sim.gif', dpi=80, writer='imagemagick', fps=60)
    else:
        plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号