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)
| 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 | """ |