From 6a723c368a4a5da9f2a44003afbc0bba93e83237 Mon Sep 17 00:00:00 2001 From: dylansdaniels-berkeley Date: Fri, 18 Oct 2024 17:19:35 -0400 Subject: [PATCH] Update PSD plot in gui _viz_manager so that min/max frequency are set according to the plot config rather than being hard coded --- hnn_core/gui/_viz_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hnn_core/gui/_viz_manager.py b/hnn_core/gui/_viz_manager.py index 504085a91..f3a154e22 100644 --- a/hnn_core/gui/_viz_manager.py +++ b/hnn_core/gui/_viz_manager.py @@ -252,8 +252,10 @@ def _update_ax(fig, ax, single_simulation, sim_name, plot_type, plot_config): elif plot_type == 'PSD': if len(dpls_copied) > 0: + min_f = plot_config['min_spectral_frequency'] + max_f = plot_config['max_spectral_frequency'] color = ax._get_lines.get_next_color() - dpls_copied[0].plot_psd(fmin=0, fmax=50, ax=ax, color=color, + dpls_copied[0].plot_psd(fmin=min_f, fmax=max_f, ax=ax, color=color, label=sim_name, show=False) elif plot_type == 'spectrogram':