From 836f62a82b5c5aec89fe8b096c779d584283c25b Mon Sep 17 00:00:00 2001 From: "D. Benesch" <34680344+danibene@users.noreply.github.com> Date: Mon, 20 May 2024 12:17:20 -0400 Subject: [PATCH] get array of colors instead of colormap object --- neurokit2/complexity/entropy_phase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neurokit2/complexity/entropy_phase.py b/neurokit2/complexity/entropy_phase.py index 8a54bb5adc..a1c4db99a9 100644 --- a/neurokit2/complexity/entropy_phase.py +++ b/neurokit2/complexity/entropy_phase.py @@ -123,7 +123,8 @@ def entropy_phase(signal, delay=1, k=4, show=False, **kwargs): Tx = Tx.astype(bool) Ys = np.sin(angles) * limx * np.sqrt(2) Xs = np.cos(angles) * limx * np.sqrt(2) - colors = plt.get_cmap("jet").resampled(k) + resampled_cmap = plt.get_cmap("jet").resampled(k) + colors = resampled_cmap(np.linspace(0, 1, k)) plt.figure() for i in range(k):