spatialdata-plot
spatialdata-plot copied to clipboard
Different plot when running as script vs Jupyter/Console
It may be related to this other bug: https://github.com/scverse/spatialdata-plot/issues/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:
While running the code as a script gives this plot:
An observation, I guess that tests behaves like running code as scripts.