Skip to content

Commit

Permalink
tweak subplot spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
ziw-liu committed Sep 24, 2024
1 parent 16f34b8 commit e423b2a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit e423b2a

Please sign in to comment.