def plot_tradeoff(peeling_trajectory, cmap=mpl.cm.viridis):
    'Visualize the trade off between coverage and density. Color\n    is used to denote the number of restricted dimensions.\n\n    Parameters\n    ----------\n    cmap : valid matplotlib colormap\n\n    Returns\n    -------\n    a Figure instance\n\n    '
    fig = plt.figure()
    ax = fig.add_subplot(111, aspect='equal')
    boundaries = np.arange((- 0.5), (max(peeling_trajectory['res_dim']) + 1.5), step=1)
    ncolors = cmap.N
    norm = mpl.colors.BoundaryNorm(boundaries, ncolors)
    p = ax.scatter(peeling_trajectory['coverage'], peeling_trajectory['density'], c=peeling_trajectory['res_dim'], norm=norm, cmap=cmap)
    ax.set_ylabel('density')
    ax.set_xlabel('coverage')
    ax.set_ylim(bottom=0, top=1.2)
    ax.set_xlim(left=0, right=1.2)
    ticklocs = np.arange(0, (max(peeling_trajectory['res_dim']) + 1), step=1)
    cb = fig.colorbar(p, spacing='uniform', ticks=ticklocs, drawedges=True)
    cb.set_label('nr. of restricted dimensions')
    return fig
Visualize the trade off between coverage and density. Color
is used to denote the number of restricted dimensions.

Parameters
----------
cmap : valid matplotlib colormap

Returns
-------
a Figure instance
def plot_tradeoff(peeling_trajectory, cmap=mpl.cm.viridis):
    'Visualize the trade off between coverage and density. Color\n    is used to denote the number of restricted dimensions.\n\n    Parameters\n    ----------\n    cmap : valid matplotlib colormap\n\n    Returns\n    -------\n    a Figure instance\n\n    '
    fig = plt.figure()
    ax = fig.add_subplot(111, aspect='equal')
    boundaries = np.arange((- 0.5), (max(peeling_trajectory['res_dim']) + 1.5), step=1)
    ncolors = cmap.N
    norm = mpl.colors.BoundaryNorm(boundaries, ncolors)
    p = ax.scatter(peeling_trajectory['coverage'], peeling_trajectory['density'], c=peeling_trajectory['res_dim'], norm=norm, cmap=cmap)
    ax.set_ylabel('density')
    ax.set_xlabel('coverage')
    ax.set_ylim(bottom=0, top=1.2)
    ax.set_xlim(left=0, right=1.2)
    ticklocs = np.arange(0, (max(peeling_trajectory['res_dim']) + 1), step=1)
    cb = fig.colorbar(p, spacing='uniform', ticks=ticklocs, drawedges=True)
    cb.set_label('nr. of restricted dimensions')
    return fig