Skip to content

Commit 9fb6cac

Browse files
committed
add missing labels to plots
1 parent efaa19a commit 9fb6cac

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

2_tps_analysis_tutorial.ipynb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@
330330
"path_lengths = [len(step.active[0].trajectory) for step in flexible.steps]\n",
331331
"plt.hist(path_lengths, bins=40, alpha=0.5);\n",
332332
"print(\"Maximum:\", max(path_lengths), \"(\"+str(max(path_lengths)*engine.snapshot_timestep)+\")\")\n",
333-
"print(\"Average:\", \"{0:.2f}\".format(np.mean(path_lengths)), \"(\"+(np.mean(path_lengths)*engine.snapshot_timestep).format(\"%.3f\")+\")\")"
333+
"print(\"Average:\", \"{0:.2f}\".format(np.mean(path_lengths)), \"(\"+(np.mean(path_lengths)*engine.snapshot_timestep).format(\"%.3f\")+\")\")\n",
334+
"plt.ylabel(\"Count\")\n",
335+
"plt.xlabel(\"Path length (Frames)\");"
334336
]
335337
},
336338
{
@@ -406,7 +408,9 @@
406408
" xticklabels=tick_labels,\n",
407409
" yticklabels=tick_labels, \n",
408410
" label_format=\"{:4.2f}\")\n",
409-
"ax = plotter.plot(cmap=\"Blues\")"
411+
"ax = plotter.plot(cmap=\"Blues\")\n",
412+
"plt.xlabel(\"$\\phi$\")\n",
413+
"plt.ylabel(\"$\\psi$\");"
410414
]
411415
},
412416
{
@@ -442,6 +446,8 @@
442446
"ax = plotter.plot(xlim=(-np.pi, 0), ylim=(-np.pi/2, np.pi), cmap=\"Blues\")\n",
443447
"plotter.plot_trajectory(trajA, '-r', lw=1)\n",
444448
"plotter.plot_trajectory(trajB, '-k', lw=1)\n",
449+
"plt.xlabel(\"$\\phi$\")\n",
450+
"plt.ylabel(\"$\\psi$\");\n",
445451
"#plt.savefig(\"AD_tps_pathdensity.pdf\") # uncomment this line to save as PDF"
446452
]
447453
},

0 commit comments

Comments
 (0)