'Set the brush(es) used to fill the interior of each spot.
If a list or array is provided, then the brush for each spot will be set separately.
Otherwise, the arguments are passed to pg.mkBrush and used as the default brush for
all spots which do not have a brush explicitly set.'

def setBrush(self, *args, **kargs):

    update = kargs.pop('update', True)
    dataSet = kargs.pop('dataSet', self.data)
    if ((len(args) == 1) and (isinstance(args[0], np.ndarray) or isinstance(args[0], list))):
        brushes = args[0]
        if (('mask' in kargs) and (kargs['mask'] is not None)):
            brushes = brushes[kargs['mask']]
        if (len(brushes) != len(dataSet)):
            raise Exception(('Number    of    brushes    does    not    match    number    of    points    (%d    !=    %d)' % (len(brushes), len(dataSet))))
        dataSet['brush'] = brushes
    else:
        self.opts['brush'] = fn.mkBrush(*args, **kargs)
    dataSet['sourceRect'] = None
    if update:
        self.updateSpots(dataSet)
