(location, orientation)
| 1358 | |
| 1359 | |
| 1360 | def _normalize_location_orientation(location, orientation): |
| 1361 | if location is None: |
| 1362 | location = _get_ticklocation_from_orientation(orientation) |
| 1363 | loc_settings = _api.getitem_checked({ |
| 1364 | "left": {"location": "left", "anchor": (1.0, 0.5), |
| 1365 | "panchor": (0.0, 0.5), "pad": 0.10}, |
| 1366 | "right": {"location": "right", "anchor": (0.0, 0.5), |
| 1367 | "panchor": (1.0, 0.5), "pad": 0.05}, |
| 1368 | "top": {"location": "top", "anchor": (0.5, 0.0), |
| 1369 | "panchor": (0.5, 1.0), "pad": 0.05}, |
| 1370 | "bottom": {"location": "bottom", "anchor": (0.5, 1.0), |
| 1371 | "panchor": (0.5, 0.0), "pad": 0.15}, |
| 1372 | }, location=location) |
| 1373 | loc_settings["orientation"] = _get_orientation_from_location(location) |
| 1374 | if orientation is not None and orientation != loc_settings["orientation"]: |
| 1375 | # Allow the user to pass both if they are consistent. |
| 1376 | raise TypeError("location and orientation are mutually exclusive") |
| 1377 | return loc_settings |
| 1378 | |
| 1379 | |
| 1380 | def _get_orientation_from_location(location): |
no test coverage detected
searching dependent graphs…