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)¶ 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)¶ Create a
PlotProfile.Parameters: - viewPanel – A
PlotPanelinstance. - overlayList – The
OverlayListinstance. - displayCtx – The
DisplayContextinstance. - extraModes – Extra modes to pass through to the
Profileconstructor.
- viewPanel – A
-
destroy()¶ Must be called when this
PlotProfileis no longer needed. Clears references and calls the base classdestroymethod.
-
getEventTargets()¶ Overrides
Profile.getEventTargets(). Returns thematplotlibCanvasobject displayed in thePlotPanel.
-
_panzoomModeLeftMouseDown(ev, canvas, mousePos, canvasPos)¶ Called on left mouse clicks. Enables panning.
-
_panzoomModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)¶ Called on left mouse drags. Updates the
PlotPanel.limitsproperty - the panning logic is provided by thematplotlibNavigationToolbar2wxclass.
-
_panzoomModeLeftMouseUp(ev, canvas, mousePos, canvasPos)¶ Called on left mouse up events. Disables panning.
-
_panzoomModeRightMouseDown(ev, canvas, mousePos, canvasPos)¶ Called on right mouse clicks. Enables zooming.
-
_panzoomModeRightMouseDrag(ev, canvas, mousePos, canvasPos)¶ Called on right mouse drags. Updates the
PlotPanel.limitsproperty - the zooming logic is provided by thematplotlibNavigationToolbar2wxclass.
-
_panzoomModeRightMouseUp(ev, canvas, mousePos, canvasPos)¶ Called on right mouse up events. Disables panning.
-
_PlotProfile__updateAxisLimits()¶ Called by the
panzoomMouseDragevent handlers. Makes sure that thePlotPanel.limitsproperty is up to date.
-
__module__= 'fsleyes.profiles.plotprofile'¶