Skip to content

Commit 169b1f9

Browse files
committed
added images from runner
1 parent a3d6170 commit 169b1f9

4 files changed

Lines changed: 1 addition & 18 deletions
-2.69 KB
Loading
18.3 KB
Loading

tests/pl/test_render_labels.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ def test_plot_respects_custom_colors_from_uns_with_groups_and_palette(
351351
"c": "blue",
352352
}
353353

354+
# palette overwrites uns colors
354355
sdata_blobs.pl.render_labels(
355356
"blobs_labels",
356357
color="category",

tests/pl/test_render_shapes.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -631,24 +631,6 @@ def test_plot_respects_custom_colors_from_uns(self, sdata_blobs: SpatialData):
631631

632632
sdata_blobs.pl.render_shapes(shapes_name, color="category", table_name="table").pl.show()
633633

634-
def test_plot_respects_custom_colors_from_uns_dict(self, sdata_blobs: SpatialData):
635-
shapes_name = "blobs_polygons"
636-
# Ensure that the table annotations point to the shapes element
637-
sdata_blobs["table"].obs["region"] = pd.Categorical([shapes_name] * sdata_blobs["table"].n_obs)
638-
sdata_blobs.set_table_annotates_spatialelement("table", region=shapes_name)
639-
640-
categories = get_standard_RNG().choice(["a", "b", "c"], size=sdata_blobs["table"].n_obs)
641-
categories[:3] = ["a", "b", "c"]
642-
categories = pd.Categorical(categories, categories=["a", "b", "c"])
643-
sdata_blobs["table"].obs["category"] = categories
644-
sdata_blobs["table"].uns["category_colors"] = {
645-
"a": "red",
646-
"b": "green",
647-
"c": "blue",
648-
}
649-
650-
sdata_blobs.pl.render_shapes(shapes_name, color="category", table_name="table").pl.show()
651-
652634
def test_plot_can_render_circles_to_hex(self, sdata_blobs: SpatialData):
653635
sdata_blobs.pl.render_shapes(element="blobs_circles", shape="hex").pl.show()
654636

0 commit comments

Comments
 (0)