Skip to content

Commit 82e54ed

Browse files
timtreisclaude
andcommitted
Use x*100 transfunc in visual tests and add title
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8a49126 commit 82e54ed

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

-46.5 KB
Binary file not shown.
-34.7 KB
Binary file not shown.

tests/pl/test_render_labels.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ def test_plot_can_color_with_norm_no_clipping(self, sdata_blobs: SpatialData):
296296
).pl.show()
297297

298298
def test_plot_transfunc_applied_to_continuous_labels(self, sdata_blobs: SpatialData):
299-
sdata_blobs.pl.render_labels("blobs_labels", color="channel_0_sum", transfunc=np.sqrt).pl.show()
299+
sdata_blobs.pl.render_labels("blobs_labels", color="channel_0_sum", transfunc=lambda x: x * 100).pl.show(
300+
title="transfunc: x * 100"
301+
)
300302

301303
def test_plot_can_annotate_labels_with_table_layer(self, sdata_blobs: SpatialData):
302304
sdata_blobs["table"].layers["normalized"] = get_standard_RNG().random(sdata_blobs["table"].X.shape)

tests/pl/test_render_shapes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,8 @@ def test_plot_can_color_with_norm_no_clipping(self, sdata_blobs_shapes_annotated
734734

735735
def test_plot_transfunc_applied_to_continuous_shapes(self, sdata_blobs_shapes_annotated: SpatialData):
736736
sdata_blobs_shapes_annotated.pl.render_shapes(
737-
element="blobs_polygons", color="value", transfunc=np.sqrt
738-
).pl.show()
737+
element="blobs_polygons", color="value", transfunc=lambda x: x * 100
738+
).pl.show(title="transfunc: x * 100")
739739

740740
def test_plot_datashader_can_color_with_norm_and_clipping(self, sdata_blobs_shapes_annotated: SpatialData):
741741
sdata_blobs_shapes_annotated.pl.render_shapes(

0 commit comments

Comments
 (0)