def _updateRangeFromPlotter(self, axis, plotter, plotterdep):
        """Update the range for axis from the plotter."""

        if axis.isLinked():
            # take range and map back to real axis
            therange = list(defaultrange)
            plotter.getRange(axis, plotterdep, therange)

            if therange != defaultrange:
                # follow up chain
                loopcheck = set()
                while axis.isLinked():
                    loopcheck.add(axis)
                    therange = axis.invertFunctionVals(therange)
                    axis = axis.getLinkedAxis()
                    if axis in loopcheck:
                        axis = None
                if axis is not None and therange is not None:
                    self.ranges[axis] = [
                        N.nanmin((self.ranges[axis][0], therange[0])),
                        N.nanmax((self.ranges[axis][1], therange[1]))
                    ]
        else:
            plotter.getRange(axis, plotterdep, self.ranges[axis])