From 7082470dc5233747efb06797721289c813c0c734 Mon Sep 17 00:00:00 2001 From: Ajit Johnson Nirmal Date: Wed, 7 Aug 2024 15:23:06 -0400 Subject: [PATCH] update dask version and fix axes bug in heatmap --- pyproject.toml | 2 +- scimap/plotting/cluster_plots.py | 7 ++----- scimap/plotting/heatmap.py | 3 ++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4a2fe7f6..570dae2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "SCIMAP" -version = "2.1.2" +version = "2.1.3" description = "Spatial Single-Cell Analysis Toolkit" license = "MIT" diff --git a/scimap/plotting/cluster_plots.py b/scimap/plotting/cluster_plots.py index 5aea7d20..4e08f72a 100644 --- a/scimap/plotting/cluster_plots.py +++ b/scimap/plotting/cluster_plots.py @@ -22,8 +22,7 @@ import seaborn as sns; sns.set(color_codes=True) sns.set_style("white") -import matplotlib as mpl -mpl.rcParams['pdf.fonttype'] = 42 +plt.rcParams['pdf.fonttype'] = 42 def main(argv=sys.argv): parser = argparse.ArgumentParser( @@ -179,9 +178,7 @@ def cluster_plots (adata, except Exception as exc: print('Finding differential markers per group cannot be completed') print (exc) - - + if __name__ == '__main__': main() - diff --git a/scimap/plotting/heatmap.py b/scimap/plotting/heatmap.py index 28681f62..9f7b64ea 100644 --- a/scimap/plotting/heatmap.py +++ b/scimap/plotting/heatmap.py @@ -323,7 +323,8 @@ def plot_category_heatmap_vectorized( ax.set_yticklabels(unique_categories) # Move the colorbar to the top left corner - cbar_ax = fig.add_axes([0.125, 0.92, 0.2, 0.02]) # x, y, width, height + # cbar_ax = fig.add_axes([0.125, 0.92, 0.2, 0.02]) # x, y, width, height + cbar_ax = ax.inset_axes([-0.5, -1.5, 4, 0.5], transform=ax.transData) cbar = plt.colorbar(c, cax=cbar_ax, orientation='horizontal') cbar_ax.xaxis.set_ticks_position('top') cbar_ax.xaxis.set_label_position('top')