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

Method get_position

lib/matplotlib/axes/_base.py:1140–1162  ·  view source on GitHub ↗

Return the position of the Axes within the figure as a `.Bbox`. Parameters ---------- original : bool If ``True``, return the original position. Otherwise, return the active position. For an explanation of the positions see `.set_

(self, original=False)

Source from the content-addressed store, hash-verified

1138 self.xaxis.get_transform(), self.yaxis.get_transform()))
1139
1140 def get_position(self, original=False):
1141 """
1142 Return the position of the Axes within the figure as a `.Bbox`.
1143
1144 Parameters
1145 ----------
1146 original : bool
1147 If ``True``, return the original position. Otherwise, return the
1148 active position. For an explanation of the positions see
1149 `.set_position`.
1150
1151 Returns
1152 -------
1153 `.Bbox`
1154
1155 """
1156 if original:
1157 return self._originalPosition.frozen()
1158 else:
1159 locator = self.get_axes_locator()
1160 if not locator:
1161 self.apply_aspect()
1162 return self._position.frozen()
1163
1164 def set_position(self, pos, which='both'):
1165 """

Callers 15

apply_aspectMethod · 0.95
_make_twin_axesMethod · 0.95
set_subplotspecMethod · 0.45
reset_positionMethod · 0.45
_label_outer_xaxisMethod · 0.45
_label_outer_yaxisMethod · 0.45
_get_aspect_ratioMethod · 0.45
test_drawFunction · 0.45
test_axis_not_in_layoutFunction · 0.45
test_usetexFunction · 0.45
test_label_without_ticksFunction · 0.45

Calls 3

get_axes_locatorMethod · 0.95
apply_aspectMethod · 0.95
frozenMethod · 0.45

Tested by 15

test_drawFunction · 0.36
test_axis_not_in_layoutFunction · 0.36
test_usetexFunction · 0.36
test_label_without_ticksFunction · 0.36
test_remove_from_figureFunction · 0.36
test_aspectsFunction · 0.36
test_offset_text_locFunction · 0.36
test_clabelMethod · 0.36