Skip to content

Commit 0460c5f

Browse files
Fixing non-saved figure
The figure generated using "do_trajectory_plot" was not saved since plt.show() was placed before plt.savefig(). I change the order of them so that the generated figure automatically gets saved when you run "do_trajectory_plot".
1 parent 8a0a29e commit 0460c5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/rustbca.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ def do_trajectory_plot(name, thickness=None, depth=None, boundary=None, plot_fin
132132
plt.ylabel('y [um]')
133133
plt.title(name+' Trajectories')
134134
plt.axis('square')
135-
if show: plt.show()
136135
plt.savefig(name+'trajectories_.png')
136+
if show: plt.show()
137137
plt.close()
138138

139139
def do_trajectory_plot_3d(name, thickness=None, depth=None, boundary=None, plot_final_positions=True, plot_origins=True, radius=None, cube_length=None, input_file=None):

0 commit comments

Comments
 (0)