Skip to content

Commit d5700e5

Browse files
Added plt.close() (#221)
Signed-off-by: Shintaro Sakoda <[email protected]>
1 parent cc140db commit d5700e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

localization/autoware_localization_evaluation_scripts/scripts/plot_diagnostics.py

+5
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def main(rosbag_path: Path, save_dir: Path = None) -> None:
165165
plt.tight_layout()
166166
save_path = save_dir / f"{diag_name_to_filename(diag_name)}.png"
167167
plt.savefig(save_path, bbox_inches="tight", pad_inches=0.05)
168+
plt.close()
168169

169170
#################
170171
# ekf_localizer #
@@ -198,6 +199,7 @@ def main(rosbag_path: Path, save_dir: Path = None) -> None:
198199
plt.tight_layout()
199200
save_path = save_dir / f"{diag_name_to_filename(diag_name)}.png"
200201
plt.savefig(save_path, bbox_inches="tight", pad_inches=0.05)
202+
plt.close()
201203

202204
#############################
203205
# pose_instability_detector #
@@ -242,6 +244,7 @@ def main(rosbag_path: Path, save_dir: Path = None) -> None:
242244
plt.tight_layout()
243245
save_path = save_dir / f"{diag_name_to_filename(diag_name)}.png"
244246
plt.savefig(save_path, bbox_inches="tight", pad_inches=0.05)
247+
plt.close()
245248

246249
##############################
247250
# localization_error_monitor #
@@ -267,6 +270,7 @@ def main(rosbag_path: Path, save_dir: Path = None) -> None:
267270
plt.tight_layout()
268271
save_path = save_dir / f"{diag_name_to_filename(diag_name)}.png"
269272
plt.savefig(save_path, bbox_inches="tight", pad_inches=0.05)
273+
plt.close()
270274

271275
#######################
272276
# gyro_bias_validator #
@@ -303,6 +307,7 @@ def main(rosbag_path: Path, save_dir: Path = None) -> None:
303307
plt.tight_layout()
304308
save_path = save_dir / f"{diag_name_to_filename(diag_name)}.png"
305309
plt.savefig(save_path, bbox_inches="tight", pad_inches=0.05)
310+
plt.close()
306311

307312

308313
if __name__ == "__main__":

0 commit comments

Comments
 (0)