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

Function _extract_marker_value

bqplot/pyplot.py:1317–1332  ·  view source on GitHub ↗

Extracts the marker value from a given marker string. Looks up the `code_dict` and returns the corresponding marker for a specific code. For example if `marker_str` is 'g-o' then the method extracts - 'green' if the code_dict is color_codes, - 'circle' if th

(marker_str, code_dict)

Source from the content-addressed store, hash-verified

1315 ``('solid', 'green', 'circle')``.
1316 """
1317 def _extract_marker_value(marker_str, code_dict):
1318 """Extracts the marker value from a given marker string.
1319
1320 Looks up the `code_dict` and returns the corresponding marker for a
1321 specific code.
1322
1323 For example if `marker_str` is 'g-o' then the method extracts
1324 - 'green' if the code_dict is color_codes,
1325 - 'circle' if the code_dict is marker_codes etc.
1326 """
1327 val = None
1328 for code in code_dict:
1329 if code in marker_str:
1330 val = code_dict[code]
1331 break
1332 return val
1333
1334 return [_extract_marker_value(marker_str, code_dict) for
1335 code_dict in [LINE_STYLE_CODES, COLOR_CODES, MARKER_CODES]]

Callers 1

_get_line_stylesFunction · 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…