Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different plot when running as script vs Jupyter/Console #363

Open
LucaMarconato opened this issue Sep 27, 2024 · 0 comments
Open

Different plot when running as script vs Jupyter/Console #363

LucaMarconato opened this issue Sep 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@LucaMarconato
Copy link
Member

It may be related to this other bug: #68

from spatialdata.datasets import blobs_annotating_element
import spatialdata_plot
import matplotlib.pyplot as plt

axes = plt.subplots(1, 2)[1]

sdata = blobs_annotating_element("blobs_circles")
sdata.pl.render_images("blobs_image").pl.render_shapes("blobs_circles", color="radius").pl.show(ax=axes[0])
sdata.pl.render_images("blobs_image").pl.render_shapes("blobs_circles", color="radius").pl.show(ax=axes[1])

plt.show()

In a Jupyter Notebook or Python console gives the following (correct) plot:
image

While running the code as a script gives this plot:
image

An observation, I guess that tests behaves like running code as scripts.

@LucaMarconato LucaMarconato added the bug Something isn't working label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant