From 87885a0eb450388c8b32dcd210e56184fcc6e9fd Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Wed, 20 Sep 2023 11:33:19 +0200 Subject: [PATCH] Better use of property color cycle for twin-plot (#40) --- lib/mplsignal/freq_plots.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/mplsignal/freq_plots.py b/lib/mplsignal/freq_plots.py index f7f8249..06763b2 100644 --- a/lib/mplsignal/freq_plots.py +++ b/lib/mplsignal/freq_plots.py @@ -228,11 +228,15 @@ def _plot_h( frequency_scale=frequency_scale, magnitude_scale=magnitude_scale, fs=fs, - color='C0', + color=ax[0]._get_lines.get_next_color(), **kwargs, ) - phase_color = 'C1' if style == 'twin' else 'C0' + phase_color = ( + ax[0]._get_lines.get_next_color() + if style == 'twin' + else ax[1]._get_lines.get_next_color() + ) _phase_plot_z( ax[1],