From 2376a64f448cf4e3c2e79697234901b27fba5b0b Mon Sep 17 00:00:00 2001 From: George Dang <53052793+gtdang@users.noreply.github.com> Date: Fri, 27 Sep 2024 15:09:56 -0400 Subject: [PATCH] refactor: move figure header and footer commands into context manager --- hnn_core/gui/_viz_manager.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hnn_core/gui/_viz_manager.py b/hnn_core/gui/_viz_manager.py index faac3832f..504085a91 100644 --- a/hnn_core/gui/_viz_manager.py +++ b/hnn_core/gui/_viz_manager.py @@ -763,9 +763,8 @@ def _add_figure(b, widgets, data, template_type, scale=0.95, dpi=96): with plt.ioff(): fig = plt.figure(figsize=figsize, dpi=dpi, layout='constrained') axd = fig.subplot_mosaic(mosaic, **kwargs) - - fig.canvas.header_visible = False - fig.canvas.footer_visible = False + fig.canvas.header_visible = False + fig.canvas.footer_visible = False if data['use_ipympl'] is False: plt.show()