diff --git a/src/robofish/io/file.py b/src/robofish/io/file.py index 5f0dbb66e7f59a9f573ef5b4a0e3940e6017f602..15e11e51005249e133f5144c695498375ac1601b 100644 --- a/src/robofish/io/file.py +++ b/src/robofish/io/file.py @@ -688,6 +688,7 @@ class File(h5py.File): skip_timesteps=0, max_timesteps=None, show=False, + legend=True, ): """Plot the file using matplotlib.pyplot @@ -783,7 +784,8 @@ class File(h5py.File): label="End", zorder=5, ) - ax.legend(loc="lower right") + if legend: + ax.legend(loc="lower right") ax.set_xlabel("x [cm]") ax.set_ylabel("y [cm]")