Skip to content

Commit 419da17

Browse files
agesmundocopybara-github
authored andcommitted
Fix plot label.
PiperOrigin-RevId: 713635908 Change-Id: Icbeef26053b10747024ea65b23ca86816f4fdb2e
1 parent f7d38da commit 419da17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,13 +1603,13 @@
16031603
"source": [
16041604
"ax = plt.gca()\n",
16051605
"\n",
1606-
"ax.plot(np.asarray(times), np.asarray(sensordata), label='timestep = {:2.2g}ms'.format(1000*dt))\n",
1606+
"ax.plot(np.asarray(times), np.asarray(sensordata), label=[f\"axis {v}\" for v in ['x', 'y', 'z']])\n",
16071607
"\n",
16081608
"# finalize plot\n",
16091609
"ax.set_title('Accelerometer values')\n",
16101610
"ax.set_ylabel('meter/second^2')\n",
16111611
"ax.set_xlabel('second')\n",
1612-
"ax.legend(frameon=True, loc='lower right');\n",
1612+
"ax.legend(frameon=True, loc='lower right')\n",
16131613
"plt.tight_layout()"
16141614
]
16151615
},

0 commit comments

Comments
 (0)