MCPcopy
hub / github.com/matplotlib/matplotlib / _get_view

Method _get_view

lib/matplotlib/axes/_base.py:4344–4359  ·  view source on GitHub ↗

Save information required to reproduce the current view. This method is called before a view is changed, such as during a pan or zoom initiated by the user. It returns an opaque object that describes the current view, in a format compatible with :meth:`_set_view`.

(self)

Source from the content-addressed store, hash-verified

4342 """
4343
4344 def _get_view(self):
4345 """
4346 Save information required to reproduce the current view.
4347
4348 This method is called before a view is changed, such as during a pan or zoom
4349 initiated by the user. It returns an opaque object that describes the current
4350 view, in a format compatible with :meth:`_set_view`.
4351
4352 The default implementation saves the view limits and autoscaling state.
4353 Subclasses may override this as needed, as long as :meth:`_set_view` is also
4354 adjusted accordingly.
4355 """
4356 return {
4357 "xlim": self.get_xlim(), "autoscalex_on": self.get_autoscalex_on(),
4358 "ylim": self.get_ylim(), "autoscaley_on": self.get_autoscaley_on(),
4359 }
4360
4361 def _set_view(self, view):
4362 """

Callers

nothing calls this directly

Calls 2

get_xlimMethod · 0.95
get_ylimMethod · 0.95

Tested by

no test coverage detected