MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _set_position

Method _set_position

lib/matplotlib/axes/_base.py:1201–1215  ·  view source on GitHub ↗

Private version of set_position. Call this internally to get the same functionality of `set_position`, but not to take the axis out of the constrained_layout hierarchy.

(self, pos, which='both')

Source from the content-addressed store, hash-verified

1199 self.set_in_layout(False)
1200
1201 def _set_position(self, pos, which='both'):
1202 """
1203 Private version of set_position.
1204
1205 Call this internally to get the same functionality of `set_position`,
1206 but not to take the axis out of the constrained_layout hierarchy.
1207 """
1208 if not isinstance(pos, mtransforms.BboxBase):
1209 pos = mtransforms.Bbox.from_bounds(*pos)
1210 for ax in self._twinned_axes.get_siblings(self):
1211 if which in ('both', 'active'):
1212 ax._position.set(pos)
1213 if which in ('both', 'original'):
1214 ax._originalPosition.set(pos)
1215 self.stale = True
1216
1217 def reset_position(self):
1218 """

Callers 13

set_subplotspecMethod · 0.95
set_positionMethod · 0.95
apply_aspectMethod · 0.95
apply_aspectMethod · 0.80
update_viewMethod · 0.80
reposition_axesFunction · 0.80
reposition_colorbarFunction · 0.80
updateMethod · 0.80
removeMethod · 0.80
make_axesFunction · 0.80
subplots_adjustMethod · 0.80
_update_viewMethod · 0.80

Calls 3

from_boundsMethod · 0.80
get_siblingsMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected