Skip to content

Commit 3da94bb

Browse files
committed
added check for 2 elements
1 parent ef9dfa7 commit 3da94bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

prody/dynamics/plotting.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ def showProjection(ensemble, modes, *args, **kwargs):
261261
c = kwargs.pop('c', 'blue')
262262
colors = kwargs.pop('color', c)
263263

264-
if isListLike(colors) and not len(colors) in [3, 4]:
264+
if isListLike(colors) and len(colors) == 2:
265+
raise ValueError('each entry of color should have 1, 3 or 4 values not 2')
266+
elif isListLike(colors) and not len(colors) in [3, 4]:
265267
colors = list(colors)
266268
elif isinstance(colors, str) or colors is None or isListLike(colors):
267269
colors = [colors] * num

0 commit comments

Comments
 (0)