From ddfae0d984220e28628cc4706fc14685302d12fe Mon Sep 17 00:00:00 2001 From: bbm 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?