Skip to content

module myna.application.bnpy.plot

Functions for generating plots of clustering data


function emptyTicks

emptyTicks(x, pos)

Return blank ticks for matplotlib.ticker.FuncFormatter()


function cluster_colormap

cluster_colormap(n_digits, colorspace='tab20')

Return colormap RGB colors, matplotlib colormap object, and color floats


function get_scatter_marker_size

get_scatter_marker_size(fig, ax, axis_distance, magic_number=7)

Get marker size so that adjacent square markers are just touching without overlapping. Calibrated at 300 dpi and 250e-6 axis_distance, approximately correct at other values


function add_cluster_colormap_colorbar

add_cluster_colormap_colorbar(fig, ax, colors, cmap, n_clusters)

function pd_normalized_histogram

pd_normalized_histogram(dataframe, scaledRanges, xmin=0, xmax=1, dpi=150)

Plot distribution of values for each column in a pandas.dataFrame


function pd_histogram

pd_histogram(dataframe, scaledRanges, dpi=150)

Plot distribution of values for each column in a pandas dataframe


function voxel_GV_plot

voxel_GV_plot(df, colors, cmap, exportName, dpi=150)

Plot GV plot for a cluster pandas.dataFrame with the given colormap


function voxel_id_stacked_histogram

voxel_id_stacked_histogram(
    df,
    field,
    colors,
    exportName,
    dpi=150,
    ids=None,
    verbose=False
)

Plot stacked histogram for clustering training data


function cluster_composition_map

cluster_composition_map(xx, yy, mesh, cluster, exportName, dpi=150)

Plot the spatial map of supervoxel composition for a specific cluster given a supervoxel mesh


function supervoxel_composition_hist

supervoxel_composition_hist(meshData, col, exportName, xmin=0, xmax=1, dpi=150)

Plot a histogram of the volume fraction of composition for each cluster given a supervoxel mesh


function supervoxel_id_colormesh

supervoxel_id_colormesh(
    mesh,
    colorValues,
    cmap,
    exportName,
    writeDir='cluster_supervoxels',
    dpi=150
)

Plot a colormesh of the supervoxel clustering IDs given a cluster supervoxel mesh and colormap


function combined_composition_colormesh

combined_composition_colormesh(id, nrows=3, ncols=5, dpi=150)

For all datasets in "training_supervoxels", plot spatial composition maps for each cluster in a single plot.


function combined_supervoxel_composition_scatter

combined_supervoxel_composition_scatter(
    df,
    n_voxel_clusters,
    supervoxel_size,
    nrows=3,
    ncols=5,
    dpi=150,
    export_name='supervoxel_composition_map.png'
)

This file was automatically generated via lazydocs.