<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def updateData(self, axeskey, x, y):
 """Replaces the currently displayed data :param axeskey: name of data plot to update. Valid options are 'stim' or 'response' :type axeskey: str :param x: index values associated with y to plot :type x: numpy.ndarray :param y: values to plot at x :type y: numpy.ndarray """

        if axeskey == 'stim':
            self.stimPlot.setData(x,y)
            # call manually to ajust placement of signal
            ranges = self.viewRange()
            self.rangeChange(self, ranges)
        if axeskey == 'response':
            self.clearTraces()
            if self._traceUnit == 'A':
                y = y * self._ampScalar
            if self.zeroAction.isChecked():
                start_avg = np.mean(y[5:25])
                y = y - start_avg
            self.tracePlot.setData(x,y*self._polarity)