Skip to content

Commit

Permalink
specify figsize
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamaedler committed May 27, 2024
1 parent 5747088 commit ea4bb5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sparcscore/utils/vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def plot_segmentation_mask(
cmap_image="Greys_r",
cmap_masks="jet",
alpha=0.5,
figsize = (10, 10)
):
"""
Visualize the segmentation mask overlayed with a channel of the input image.
Expand Down Expand Up @@ -52,7 +53,7 @@ def plot_segmentation_mask(
segmentation = segmentation[mask_channel, selection[0], selection[1]]
image = channels[image_channel, selection[0], selection[1]]

fig = plt.figure()
fig = plt.figure(figsize=figsize)
plt.imshow(image, cmap=cmap_image)
plt.imshow(segmentation, alpha=alpha, cmap=cmap_masks)
plt.axis("off")
Expand Down

0 comments on commit ea4bb5e

Please sign in to comment.