Skip to content

Commit 91fef98

Browse files
author
Enrique Fernandez
committed
Close figure (reduce memory consumption)
1 parent 8111eba commit 91fef98

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bag_tools/scripts/check_drop.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def check_drop(inbags, plot_format='png'):
145145
plt.plot(x, numpy.array([seq_diff_mean, seq_diff_mean]), 'g')
146146

147147
plt.savefig(basename + topic.replace('/', '_').replace(' ', '_').replace(':', '_') + '.' + plot_format)
148+
plt.close(fig)
148149
except OverflowError as e:
149150
rospy.logerr('%s: Failed to save plots as %s image files (try other format, e.g. svg): %s', topic.ljust(max_len + 2), plot_format, e.message)
150151

0 commit comments

Comments
 (0)