def finalize_offset(self): loc_in_canvas = self.get_loc_in_canvas() bbox = self.legend.get_bbox_to_anchor() _bbox_transform = BboxTransformFrom(bbox) self.legend._loc = tuple( _bbox_transform.transform_point(loc_in_canvas))
def _update_loc(self, loc_in_canvas): bbox = self.legend.get_bbox_to_anchor() # if bbox has zero width or height, the transformation is # ill-defined. Fall back to the defaul bbox_to_anchor. if bbox.width ==0 or bbox.height ==0: self.legend.set_bbox_to_anchor(None) bbox = self.legend.get_bbox_to_anchor() _bbox_transform = BboxTransformFrom(bbox) self.legend._loc = tuple(_bbox_transform.transform_point(loc_in_canvas))
def _update_loc(self, loc_in_canvas): bbox = self.legend.get_bbox_to_anchor() # if bbox has zero width or height, the transformation is # ill-defined. Fall back to the defaul bbox_to_anchor. if bbox.width ==0 or bbox.height ==0: self.legend.set_bbox_to_anchor(None) bbox = self.legend.get_bbox_to_anchor() _bbox_transform = BboxTransformFrom(bbox) self.legend._loc = tuple(_bbox_transform.transform_point(loc_in_canvas))
def finalize_offset(self): loc_in_canvas = self.get_loc_in_canvas() bbox = self.legend.get_bbox_to_anchor() _bbox_transform = BboxTransformFrom(bbox) self.legend._loc = tuple(_bbox_transform.transform_point(loc_in_canvas))