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)
| 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]] |
no outgoing calls
no test coverage detected
searching dependent graphs…