Esempio n. 1
0
 def _get_color(self, c, N=1):
     if looks_like_color(c):
         return  [colorConverter.to_rgba(c)]*N
     elif iterable(c) and len(c) and iterable(c[0]) and len(c[0])==4:
         # looks like a tuple of rgba
         return c
     else:
         raise TypeError('c must be a matplotlib color arg or nonzero length sequence of rgba tuples')
Esempio n. 2
0
 def _get_color(self, c, N=1):
     if looks_like_color(c):
         return  [colorConverter.to_rgba(c)]*N
     elif iterable(c) and len(c) and iterable(c[0]) and len(c[0])==4:
         # looks like a tuple of rgba
         return c
     else:
         raise TypeError('c must be a matplotlib color arg or nonzero length sequence of rgba tuples')