Skip to content

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

Open
@LucaMarconato

Description

@LucaMarconato

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions