fsleyes.profiles.plotprofile¶
This module contains the PlotProfile class, a Profile
for use with PlotPanel views.
-
class
fsleyes.profiles.plotprofile.PlotProfile(viewPanel, overlayList, displayCtx, extraModes=None)[source]¶ Bases:
fsleyes.profiles.ProfileThe
PlotProfileclass is the default interaction profile forPlotPanelvies. It provides pan and zoom functionality via a singleProfile.modecalledpanzoom:Left click and drag to pan the plot
Right click and drag to zoom the plot.
-
__init__(viewPanel, overlayList, displayCtx, extraModes=None)[source]¶ Create a
PlotProfile.- Parameters
viewPanel – A
PlotPanelinstance.overlayList – The
OverlayListinstance.displayCtx – The
DisplayContextinstance.extraModes – Extra modes to pass through to the
Profileconstructor.
-
destroy()[source]¶ Must be called when this
PlotProfileis no longer needed. Clears references and calls the base classdestroymethod.
-
getEventTargets()[source]¶ Overrides
Profile.getEventTargets(). Returns thematplotlibCanvasobject displayed in thePlotPanel.
-
__updateAxisLimits()¶ Called by the
panzoomMouseDragevent handlers. Makes sure that thePlotPanel.limitsproperty is up to date.
-
_panzoomModeLeftMouseDown(ev, canvas, mousePos, canvasPos)[source]¶ Called on left mouse clicks. Enables panning.
-
_panzoomModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)[source]¶ Called on left mouse drags. Updates the
PlotPanel.limitsproperty - the panning logic is provided by thematplotlibNavigationToolbar2wxclass.
-
_panzoomModeLeftMouseUp(ev, canvas, mousePos, canvasPos)[source]¶ Called on left mouse up events. Disables panning.
-
_panzoomModeRightMouseDown(ev, canvas, mousePos, canvasPos)[source]¶ Called on right mouse clicks. Enables zooming.
-
_panzoomModeRightMouseDrag(ev, canvas, mousePos, canvasPos)[source]¶ Called on right mouse drags. Updates the
PlotPanel.limitsproperty - the zooming logic is provided by thematplotlibNavigationToolbar2wxclass.
-
_panzoomModeRightMouseUp(ev, canvas, mousePos, canvasPos)[source]¶ Called on right mouse up events. Disables panning.
-
__module__= 'fsleyes.profiles.plotprofile'¶