'Return colorbar data coordinates for *N* uniformly
spaced boundaries, plus ends if required.'

def _uniform_y(self, N):

    if (self.extend == u'neither'):
        y = np.linspace(0, 1, N)
    else:
        automin = automax = (1.0 / (N - 1.0))
        extendlength = self._get_extension_lengths(self.extendfrac, automin, automax, default=0.05)
        if (self.extend == u'both'):
            y = np.zeros((N + 2), u'd')
            y[0] = (0.0 - extendlength[0])
            y[(-1)] = (1.0 + extendlength[1])
        elif (self.extend == u'min'):
            y = np.zeros((N + 1), u'd')
            y[0] = (0.0 - extendlength[0])
        else:
            y = np.zeros((N + 1), u'd')
            y[(-1)] = (1.0 + extendlength[1])
        y[self._inside] = np.linspace(0, 1, N)
    return y
