Skip to content

made it possible to call pl.add_box() without needing to specify the axis#178

Merged
MeyerBender merged 1 commit into
mainfrom
enhancement/axis_for_add_box
May 12, 2026
Merged

made it possible to call pl.add_box() without needing to specify the axis#178
MeyerBender merged 1 commit into
mainfrom
enhancement/axis_for_add_box

Conversation

@MeyerBender
Copy link
Copy Markdown
Collaborator

fig, ax = plt.subplots(1, 2, figsize=(10, 5), dpi=200)
_ = ds.pp['DAPI'].pl.add_box([1500, 2000], [1500, 2000]).pl.show(ax=ax[0])
_ = ds.pp['DAPI'].pl.add_box([1500, 2000], [1500, 2000]).pl.show(ax=ax[1])

This code previously did not show the box for the first plot, the workaround was to specify ax=ax[0] in pl.add_box() as well. Now, rendering of boxes is deferred to the pl.imshow() function, so that all boxes are rendered at the very end of the rendering pipeline.

@MeyerBender MeyerBender merged commit 2dc4a31 into main May 12, 2026
3 checks passed
@MeyerBender MeyerBender deleted the enhancement/axis_for_add_box branch May 12, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant