Ejemplo n.º 1
0
fig.savefig('traj2.pdf', bbox_inches='tight')

# Plot 3D
# fig_3D = plt.figure(figsize=(10, 10))
# ax_3D = fig_3D.add_subplot(111, projection='3d')
# Plotter.plot_trajectory_3D(ax_3D, model.x.repeated(X_all))


# ---------------------------- Heuristics ---------------------------------- #
model = new_model()

reload(plotter)
from plotter import Plotter

# start of figure
fig, ax = Plotter.plot_heuristics(model, x_all, u_all)

# OAC
ax[0, 0].set_title('Optic acceleration cancellation (OAC)',
                   fontsize=11, y=1.02)
ax[0, 0].set_xlabel('Time $t$ [sec]', fontsize=10, labelpad=2)
ax[0, 0].set_ylabel(r"Tangent of elevation angle $\tan\alpha$",
                    labelpad=2, fontsize=10)
ax[0, 0].set_xlim(0, 3)
ax[0, 0].set_ylim(0, 1.6)
ax[0, 0].set_xticks([0, 0.5, 1, 1.5, 2, 2.5, 3])
ax[0, 0].tick_params(labelsize=10)
ax[0, 0].grid(True)
ax[0, 0].set_axisbelow(True)
ax[0, 0].legend(loc='lower right', fontsize=10)