PanAndZoom#

class PanAndZoom(figure=None, scale_factor=1.1)[source]#

Class providing pan & zoom interaction to a matplotlib Figure. Left button for pan, right button for zoom area and zoom on wheel. Support subplots, twin Axes and log scales.

This class extends the ZoomOnWheel class.

Parameters:
  • figure (figure) – The matplotlib figure to attach the behavior to.

  • scale_factor (float) – The scale factor to apply on wheel event.

Attributes

figure#

The Figure this interaction is connected to or None if not connected.

Methods

auto_scale()[source]#

Auto scaler.

disconnect()#

Disconnect interaction from Figure.