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

Function _get_line_styles

bqplot/pyplot.py:1311–1335  ·  view source on GitHub ↗

Return line style, color and marker type from specified marker string. For example, if ``marker_str`` is 'g-o' then the method returns ``('solid', 'green', 'circle')``.

(marker_str)

Source from the content-addressed store, hash-verified

1309
1310
1311def _get_line_styles(marker_str):
1312 """Return line style, color and marker type from specified marker string.
1313
1314 For example, if ``marker_str`` is 'g-o' then the method returns
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

plotFunction · 0.85

Calls 1

_extract_marker_valueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…