(self, loc_in_canvas)
| 81 | self._update_bbox_to_anchor(self.get_loc_in_canvas()) |
| 82 | |
| 83 | def _update_loc(self, loc_in_canvas): |
| 84 | bbox = self.legend.get_bbox_to_anchor() |
| 85 | # if bbox has zero width or height, the transformation is |
| 86 | # ill-defined. Fall back to the default bbox_to_anchor. |
| 87 | if bbox.width == 0 or bbox.height == 0: |
| 88 | self.legend.set_bbox_to_anchor(None) |
| 89 | bbox = self.legend.get_bbox_to_anchor() |
| 90 | _bbox_transform = BboxTransformFrom(bbox) |
| 91 | self.legend._loc = tuple(_bbox_transform.transform(loc_in_canvas)) |
| 92 | |
| 93 | def _update_bbox_to_anchor(self, loc_in_canvas): |
| 94 | loc_in_bbox = self.legend.axes.transAxes.transform(loc_in_canvas) |
no test coverage detected