MCPcopy Index your code
hub / github.com/bqplot/bqplot / _process_cmap

Function _process_cmap

bqplot/pyplot.py:513–526  ·  view source on GitHub ↗

Returns a kwarg dict suitable for a ColorScale

(cmap)

Source from the content-addressed store, hash-verified

511
512
513def _process_cmap(cmap):
514 '''
515 Returns a kwarg dict suitable for a ColorScale
516 '''
517 option = {}
518 if isinstance(cmap, str):
519 option['scheme'] = cmap
520 elif isinstance(cmap, list):
521 option['colors'] = cmap
522 else:
523 raise ValueError('''`cmap` must be a string (name of a color scheme)
524 or a list of colors, but a value of {} was given
525 '''.format(cmap))
526 return option
527
528
529def set_cmap(cmap):

Callers 2

set_cmapFunction · 0.85
_draw_markFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…