blob: 01e9744c7bf9a3e0338616bc86847b3968da5f9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
From ddfae0d984220e28628cc4706fc14685302d12fe Mon Sep 17 00:00:00 2001
From: bbm <brian.maranville@nist.gov>
Date: Wed, 13 Dec 2023 16:54:36 -0500
Subject: [PATCH] apply fix suggested in #129
---
bumps/plotutil.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/bumps/plotutil.py b/bumps/plotutil.py
index 3f47e61e..cbbda879 100644
--- a/bumps/plotutil.py
+++ b/bumps/plotutil.py
@@ -54,6 +54,15 @@ def next_color():
import pylab
lines = pylab.gca()._get_lines
try:
+ base = lines.get_next_color()
+ except Exception:
+ try: # Cruft 1.7 - 3.7?
+ base = next(lines.prop_cycler)['color']
+ except Exception:
+ try: # Cruft 1.4-1.6?
+ base = next(lines.color_cycle)
+ except Exception: # Cruft 1.3 and earlier
+ base = lines._get_next_cycle_color()
base = next(lines.prop_cycler)['color']
except Exception:
try: # Cruft 1.4-1.6?
|