diff --git a/smoother/visualization.py b/smoother/visualization.py index 44f5171..9b4c15b 100644 --- a/smoother/visualization.py +++ b/smoother/visualization.py @@ -12,6 +12,7 @@ import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable from plotnine import * +from smoother.utils import normalize_minmax def plot_celltype_props(p_inf, coords, cell_type_names = None, n_col = 4, figsize = None): """Plot the deconvolution results. @@ -207,6 +208,9 @@ def cluster_and_plot_celltype_props(p_inf_list, coords, names = None, n_col = 4, if isinstance(coords, pd.DataFrame): coords = coords.values + # scale the coordinates for geom_tile + coords = normalize_minmax(coords) + # cluster cell type proportions clu_inf_list = [ cluster_features(p_inf, transform = transform, n_neighbors=n_neighbors, res = res)