Skip to content

Commit 412983a

Browse files
authored
Merge pull request #2795 from jmoraleda/plotcanvas-scroll-left-down
Add ScrollLeft and ScrollDown to PlotCanvas to complement already-ext…
2 parents aa3f78c + d09d19b commit 412983a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

wx/lib/plot/plotcanvas.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,13 +1456,21 @@ def ScrollRight(self, units):
14561456
xAxis = (xAxis[0] + units, xAxis[1] + units)
14571457
self._Draw(graphics, xAxis, yAxis)
14581458

1459+
def ScrollLeft(self, units):
1460+
"""Move view left number of axis units."""
1461+
self.ScrollRight(-units)
1462+
14591463
def ScrollUp(self, units):
14601464
"""Move view up number of axis units."""
14611465
self.last_PointLabel = None # reset pointLabel
14621466
if self.last_draw is not None:
14631467
graphics, xAxis, yAxis = self.last_draw
14641468
yAxis = (yAxis[0] + units, yAxis[1] + units)
14651469
self._Draw(graphics, xAxis, yAxis)
1470+
1471+
def ScrollDown(self, units):
1472+
"""Move view down number of axis units."""
1473+
self.ScrollUp(-units)
14661474

14671475
def GetXY(self, event):
14681476
"""Wrapper around _getXY, which handles log scales"""

0 commit comments

Comments
 (0)