From 1f590c12750fa8ec8b61e1b052b6e809319535c9 Mon Sep 17 00:00:00 2001 From: Maxime <84160692+maxzand@users.noreply.github.com> Date: Fri, 28 Mar 2025 19:50:52 -0400 Subject: [PATCH] Fixed contact force legend and added legends for accel and velocity --- python/tutorial.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/tutorial.ipynb b/python/tutorial.ipynb index 0c7be7be..c0933859 100644 --- a/python/tutorial.ipynb +++ b/python/tutorial.ipynb @@ -1360,16 +1360,18 @@ "lines = ax[0,0].plot(sim_time, force)\n", "ax[0,0].set_title('contact force')\n", "ax[0,0].set_ylabel('Newton')\n", - "ax[0,0].legend(iter(lines), ('normal z', 'friction x', 'friction y'));\n", + "ax[0,0].legend(lines, ('normal z', 'friction x', 'friction y'));\n", "\n", "ax[1,0].plot(sim_time, acceleration)\n", "ax[1,0].set_title('acceleration')\n", "ax[1,0].set_ylabel('(meter,radian)/s/s')\n", + "ax[1,0].legend(['ax', 'ay', 'az', 'αx', 'αy', 'αz'])\n", "\n", "ax[2,0].plot(sim_time, velocity)\n", "ax[2,0].set_title('velocity')\n", "ax[2,0].set_ylabel('(meter,radian)/s')\n", "ax[2,0].set_xlabel('second')\n", + "ax[2,0].legend(['vx', 'vy', 'vz', 'ωx', 'ωy', 'ωz'])\n", "\n", "ax[0,1].plot(sim_time, ncon)\n", "ax[0,1].set_title('number of contacts')\n",