From d3ec97e72878a387f2fda51fc2da1574ef7af4cc Mon Sep 17 00:00:00 2001 From: George Dang <53052793+gtdang@users.noreply.github.com> Date: Thu, 7 Dec 2023 16:39:51 -0500 Subject: [PATCH] fix: GUI dipole plot bug. Refactored GUI color cycling to for matplotlib 8.x deprecation of ax._get_lines.prop_cycler. --- hnn_core/gui/_viz_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hnn_core/gui/_viz_manager.py b/hnn_core/gui/_viz_manager.py index 883a281d7..82941295c 100644 --- a/hnn_core/gui/_viz_manager.py +++ b/hnn_core/gui/_viz_manager.py @@ -150,7 +150,7 @@ def _update_ax(fig, ax, single_simulation, sim_name, plot_type, plot_config): elif plot_type == 'PSD': if len(dpls_copied) > 0: - color = next(ax._get_lines.prop_cycler)['color'] + color = ax._get_lines.get_next_color() dpls_copied[0].plot_psd(fmin=0, fmax=50, ax=ax, color=color, label=sim_name, show=False) @@ -175,7 +175,7 @@ def _update_ax(fig, ax, single_simulation, sim_name, plot_type, plot_config): else: label = sim_name - color = next(ax._get_lines.prop_cycler)['color'] + color = ax._get_lines.get_next_color() if plot_type == 'current dipole': plot_dipole(dpls_copied, ax=ax,