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

Method _set_lims

lib/matplotlib/axes/_secondary_axes.py:251–268  ·  view source on GitHub ↗

Set the limits based on parent limits and the convert method between the parent and this secondary Axes.

(self)

Source from the content-addressed store, hash-verified

249 self._parentscale = pscale
250
251 def _set_lims(self):
252 """
253 Set the limits based on parent limits and the convert method
254 between the parent and this secondary Axes.
255 """
256 if self._orientation == 'x':
257 lims = self._parent.get_xlim()
258 set_lim = self.set_xlim
259 else: # 'y'
260 lims = self._parent.get_ylim()
261 set_lim = self.set_ylim
262 order = lims[0] < lims[1]
263 lims = self._functions[0](np.array(lims))
264 neworder = lims[0] < lims[1]
265 if neworder != order:
266 # Flip because the transform will take care of the flipping.
267 lims = lims[::-1]
268 set_lim(lims)
269
270 def set_aspect(self, *args, **kwargs):
271 """

Callers 2

apply_aspectMethod · 0.95
drawMethod · 0.95

Calls 2

get_xlimMethod · 0.45
get_ylimMethod · 0.45

Tested by

no test coverage detected