def zoomIn(self):
        
        if -1 == self.zoomIndex:
            # return to starting (0 index) state
            self.getXAxis().setAxisMin(self.initialPlotRegion.xMin)
            self.getXAxis().setAxisMax(self.initialPlotRegion.xMax)
            self.getYAxis().setAxisMin(self.initialPlotRegion.yMin)
            self.getYAxis().setAxisMax(self.initialPlotRegion.yMax)
            self.p1.x = self.initialSelectionRegion.xMin
            self.p2.x = self.initialSelectionRegion.xMax
            self.p1.y = self.initialSelectionRegion.yMin
            self.p2.y = self.initialSelectionRegion.yMax
        
        else:
            xMin = self.getXAxis().getAxisMin()
            xMax = self.getXAxis().getAxisMax()
            yMin = self.getYAxis().getAxisMin()
            yMax = self.getYAxis().getAxisMax()
            if 0 == self.zoomIndex:
                # moving away from starting state
                self.initialPlotRegion.xMin = xMin
                self.initialPlotRegion.xMax = xMax
                self.initialPlotRegion.yMin = yMin
                self.initialPlotRegion.yMax = yMax
                self.initialSelectionRegion.xMin = min(self.p1.x, self.p2.x)
                self.initialSelectionRegion.xMax = max(self.p1.x, self.p2.x)
                self.initialSelectionRegion.yMin = min(self.p1.y, self.p2.y)
                self.initialSelectionRegion.yMax = max(self.p1.y, self.p2.y)
                dx = xMax - xMin
                dy = yMax - yMin
                # center plot area on selection cursor
                xMin = (self.p1.x + self.p2.x - dx)/2
                xMax = (self.p1.x + self.p2.x + dx)/2
                yMin = (self.p1.y + self.p2.y - dy)/2
                yMax = (self.p1.y + self.p2.y + dy)/2
            
            
            pXMin = min(self.p1.x, self.p2.x)
            pXMax = max(self.p1.x, self.p2.x)
            pYMin = min(self.p1.y, self.p2.y)
            pYMax = max(self.p1.y, self.p2.y)
            
            newPXSize = (pXMax-pXMin)*(pXMax-pXMin)/(xMax - xMin)
            newPYSize = (pYMax-pYMin)*(pYMax-pYMin)/(yMax - yMin)
            
            xCenter = (self.p1.x + self.p2.x)/2
            yCenter = (self.p1.y + self.p2.y)/2
            self.p1.x = xCenter - newPXSize/2
            self.p2.x = xCenter + newPXSize/2
            self.p1.y = yCenter - newPYSize/2
            self.p2.y = yCenter + newPYSize/2
            
            self.getXAxis().setAxisMin(pXMin)
            self.getXAxis().setAxisMax(pXMax)
            self.getYAxis().setAxisMin(pYMin)
            self.getYAxis().setAxisMax(pYMax)
            
        
        self.updateCursor()
        self.zoomIndex += 1
dataset/ETHPy150Open anandology/pyjamas/examples/gcharttestapp/GChartExample24.py/GChartExample24.zoomIn/original