From e423b2a932c6c582a4400af2e81bf44d5c61a512 Mon Sep 17 00:00:00 2001 From: Ziwen Liu Date: Mon, 23 Sep 2024 23:15:51 -0700 Subject: [PATCH] tweak subplot spacing --- .../figures/organelle_dynamics.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/applications/contrastive_phenotyping/figures/organelle_dynamics.py b/applications/contrastive_phenotyping/figures/organelle_dynamics.py index e7aa012f..9a7448a4 100644 --- a/applications/contrastive_phenotyping/figures/organelle_dynamics.py +++ b/applications/contrastive_phenotyping/figures/organelle_dynamics.py @@ -150,11 +150,11 @@ def render(img, cmaps: list[str]): # %% -fig = plt.figure(layout="constrained", figsize=(5.5, 2.5)) -subfigs = fig.subfigures(1, 2, wspace=0.05, width_ratios=[3, 5]) +fig = plt.figure(layout="constrained", figsize=(5.5, 2.7)) +subfigs = fig.subfigures(1, 2, wspace=0.02, width_ratios=[4, 7]) umap_fig = subfigs[0] -umap_fig.suptitle("A", horizontalalignment="left", x=0, y=1.01) +umap_fig.suptitle("A", horizontalalignment="left", x=0, y=1) umap_ax = umap_fig.subplots(1, 1) umap_ax.invert_xaxis() @@ -201,14 +201,14 @@ def render(img, cmaps: list[str]): labels=labels[1:5] + labels[6:], loc="upper center", ncol=2, - bbox_to_anchor=(0.5, -0.3), + bbox_to_anchor=(0.5, -0.2), labelspacing=0.2, handletextpad=0, fontsize=8, ) img_fig = subfigs[1] -img_fig.suptitle("B", horizontalalignment="left", x=-0.0, y=1.01) +img_fig.suptitle("B", horizontalalignment="left", x=-0, y=1) img_axes = img_fig.subplots(3, 4, sharex=True, sharey=True) for i, (ax, rend, time, track_name) in enumerate(