Skip to content

Commit e515629

Browse files
committed
Reverse *then* shift 'cmap_r_s' colormaps
1 parent 074c6ae commit e515629

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

proplot/colors.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,14 +2319,6 @@ def __getitem__(self, key):
23192319
)
23202320

23212321
# Auto-reverse and auto-shift
2322-
if shift:
2323-
if hasattr(value, 'shifted'):
2324-
value = value.shifted(180)
2325-
else:
2326-
raise KeyError(
2327-
f'Item of type {type(value).__name__!r} '
2328-
'does not have shifted() method.'
2329-
)
23302322
if reverse:
23312323
if hasattr(value, 'reversed'):
23322324
value = value.reversed()
@@ -2335,6 +2327,14 @@ def __getitem__(self, key):
23352327
f'Item of type {type(value).__name__!r} '
23362328
'does not have reversed() method.'
23372329
)
2330+
if shift:
2331+
if hasattr(value, 'shifted'):
2332+
value = value.shifted(180)
2333+
else:
2334+
raise KeyError(
2335+
f'Item of type {type(value).__name__!r} '
2336+
'does not have shifted() method.'
2337+
)
23382338
return value
23392339

23402340
def __setitem__(self, key, item):

0 commit comments

Comments
 (0)