def plotClusterSpace(self, waveforms, param='Amp', clusts=None, bins=256, **kwargs):
    '\n        TODO: aspect of plot boxes in ImageGrid not right as scaled by range of\n        values now\n        '
    from ephysiopy.dacq2py.tintcolours import colours as tcols
    import matplotlib.colors as colors
    from itertools import combinations
    from mpl_toolkits.axes_grid1 import ImageGrid
    self.scaling = np.full(4, 15)
    amps = self.getParam(waveforms, param=param)
    bad_electrodes = np.setdiff1d(np.array(range(4)), np.array(np.sum(amps, 0).nonzero())[0])
    cmap = np.tile(tcols[0], (bins, 1))
    cmap[0] = (1, 1, 1)
    cmap = colors.ListedColormap(cmap)
    cmap._init()
    alpha_vals = np.ones((cmap.N + 3))
    alpha_vals[0] = 0
    cmap._lut[:, (- 1)] = alpha_vals
    cmb = combinations(range(4), 2)
    if ('fig' in kwargs):
        fig = kwargs['fig']
    else:
        fig = plt.figure(figsize=(8, 6))
    grid = ImageGrid(fig, 111, nrows_ncols=(2, 3), axes_pad=0.1, aspect=False)
    if ('Amp' in param):
        myRange = np.vstack(((self.scaling * 0), (self.scaling * 2)))
    else:
        myRange = None
    clustCMap0 = np.tile(tcols[0], (bins, 1))
    clustCMap0[0] = (1, 1, 1)
    clustCMap0 = colors.ListedColormap(clustCMap0)
    clustCMap0._init()
    clustCMap0._lut[:, (- 1)] = alpha_vals
    for (i, c) in enumerate(cmb):
        if (c not in bad_electrodes):
            (h, ye, xe) = np.histogram2d(amps[:, c[0]], amps[:, c[1]], range=myRange[:, c].T, bins=bins)
            (x, y) = np.meshgrid(xe[0:(- 1)], ye[0:(- 1)])
            grid[i].pcolormesh(x, y, h, cmap=clustCMap0, shading='nearest', edgecolors='face')
            (h, ye, xe) = np.histogram2d(amps[:, c[0]], amps[:, c[1]], range=myRange[:, c].T, bins=bins)
            clustCMap = np.tile(tcols[1], (bins, 1))
            clustCMap[0] = (1, 1, 1)
            clustCMap = colors.ListedColormap(clustCMap)
            clustCMap._init()
            clustCMap._lut[:, (- 1)] = alpha_vals
            grid[i].pcolormesh(x, y, h, cmap=clustCMap, shading='nearest', edgecolors='face')
        s = ((str((c[0] + 1)) + ' v ') + str((c[1] + 1)))
        grid[i].text(0.05, 0.95, s, va='top', ha='left', size='small', color='k', transform=grid[i].transAxes)
        grid[i].set_xlim(xe.min(), xe.max())
        grid[i].set_ylim(ye.min(), ye.max())
    plt.setp([a.get_xticklabels() for a in grid], visible=False)
    plt.setp([a.get_yticklabels() for a in grid], visible=False)
    return fig
TODO: aspect of plot boxes in ImageGrid not right as scaled by range of
values now
def plotClusterSpace(self, waveforms, param='Amp', clusts=None, bins=256, **kwargs):
    '\n        TODO: aspect of plot boxes in ImageGrid not right as scaled by range of\n        values now\n        '
    from ephysiopy.dacq2py.tintcolours import colours as tcols
    import matplotlib.colors as colors
    from itertools import combinations
    from mpl_toolkits.axes_grid1 import ImageGrid
    self.scaling = np.full(4, 15)
    amps = self.getParam(waveforms, param=param)
    bad_electrodes = np.setdiff1d(np.array(range(4)), np.array(np.sum(amps, 0).nonzero())[0])
    cmap = np.tile(tcols[0], (bins, 1))
    cmap[0] = (1, 1, 1)
    cmap = colors.ListedColormap(cmap)
    cmap._init()
    alpha_vals = np.ones((cmap.N + 3))
    alpha_vals[0] = 0
    cmap._lut[:, (- 1)] = alpha_vals
    cmb = combinations(range(4), 2)
    if ('fig' in kwargs):
        fig = kwargs['fig']
    else:
        fig = plt.figure(figsize=(8, 6))
    grid = ImageGrid(fig, 111, nrows_ncols=(2, 3), axes_pad=0.1, aspect=False)
    if ('Amp' in param):
        myRange = np.vstack(((self.scaling * 0), (self.scaling * 2)))
    else:
        myRange = None
    clustCMap0 = np.tile(tcols[0], (bins, 1))
    clustCMap0[0] = (1, 1, 1)
    clustCMap0 = colors.ListedColormap(clustCMap0)
    clustCMap0._init()
    clustCMap0._lut[:, (- 1)] = alpha_vals
    for (i, c) in enumerate(cmb):
        if (c not in bad_electrodes):
            (h, ye, xe) = np.histogram2d(amps[:, c[0]], amps[:, c[1]], range=myRange[:, c].T, bins=bins)
            (x, y) = np.meshgrid(xe[0:(- 1)], ye[0:(- 1)])
            grid[i].pcolormesh(x, y, h, cmap=clustCMap0, shading='nearest', edgecolors='face')
            (h, ye, xe) = np.histogram2d(amps[:, c[0]], amps[:, c[1]], range=myRange[:, c].T, bins=bins)
            clustCMap = np.tile(tcols[1], (bins, 1))
            clustCMap[0] = (1, 1, 1)
            clustCMap = colors.ListedColormap(clustCMap)
            clustCMap._init()
            clustCMap._lut[:, (- 1)] = alpha_vals
            grid[i].pcolormesh(x, y, h, cmap=clustCMap, shading='nearest', edgecolors='face')
        s = ((str((c[0] + 1)) + ' v ') + str((c[1] + 1)))
        grid[i].text(0.05, 0.95, s, va='top', ha='left', size='small', color='k', transform=grid[i].transAxes)
        grid[i].set_xlim(xe.min(), xe.max())
        grid[i].set_ylim(ye.min(), ye.max())
    plt.setp([a.get_xticklabels() for a in grid], visible=False)
    plt.setp([a.get_yticklabels() for a in grid], visible=False)
    return fig