Fixed contact force legend and added legends for accel and velocity

This commit is contained in:
Maxime
2025-03-28 19:50:52 -04:00
parent 01d4c46753
commit 1f590c1275
+3 -1
View File
@@ -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",