@@ -40,7 +40,7 @@ def test_plot_can_render_circles_with_outline(self, sdata_blobs: SpatialData):
4040 sdata_blobs .pl .render_shapes (element = "blobs_circles" , outline_alpha = 1 ).pl .show ()
4141
4242 def test_plot_can_render_circles_with_colored_outline (self , sdata_blobs : SpatialData ):
43- sdata_blobs .pl .render_shapes (element = "blobs_circles" , outline_color = "red" ).pl .show ()
43+ sdata_blobs .pl .render_shapes (element = "blobs_circles" , outline_alpha = 1 , outline_color = "red" ).pl .show ()
4444
4545 def test_plot_can_render_polygons (self , sdata_blobs : SpatialData ):
4646 sdata_blobs .pl .render_shapes (element = "blobs_polygons" ).pl .show ()
@@ -49,13 +49,17 @@ def test_plot_can_render_polygons_with_outline(self, sdata_blobs: SpatialData):
4949 sdata_blobs .pl .render_shapes (element = "blobs_polygons" , outline_alpha = 1 ).pl .show ()
5050
5151 def test_plot_can_render_polygons_with_str_colored_outline (self , sdata_blobs : SpatialData ):
52- sdata_blobs .pl .render_shapes (element = "blobs_polygons" , outline_color = "red" ).pl .show ()
52+ sdata_blobs .pl .render_shapes (element = "blobs_polygons" , outline_alpha = 1 , outline_color = "red" ).pl .show ()
5353
5454 def test_plot_can_render_polygons_with_rgb_colored_outline (self , sdata_blobs : SpatialData ):
55- sdata_blobs .pl .render_shapes (element = "blobs_polygons" , outline_color = (0.0 , 0.0 , 1.0 , 1.0 )).pl .show ()
55+ sdata_blobs .pl .render_shapes (
56+ element = "blobs_polygons" , outline_alpha = 1 , outline_color = (0.0 , 0.0 , 1.0 , 1.0 )
57+ ).pl .show ()
5658
5759 def test_plot_can_render_polygons_with_rgba_colored_outline (self , sdata_blobs : SpatialData ):
58- sdata_blobs .pl .render_shapes (element = "blobs_polygons" , outline_color = (0.0 , 1.0 , 0.0 , 1.0 )).pl .show ()
60+ sdata_blobs .pl .render_shapes (
61+ element = "blobs_polygons" , outline_alpha = 1 , outline_color = (0.0 , 1.0 , 0.0 , 1.0 )
62+ ).pl .show ()
5963
6064 def test_plot_can_render_empty_geometry (self , sdata_blobs : SpatialData ):
6165 sdata_blobs .shapes ["blobs_circles" ].at [0 , "geometry" ] = gpd .points_from_xy ([None ], [None ])[0 ]
@@ -65,7 +69,7 @@ def test_plot_can_render_circles_with_default_outline_width(self, sdata_blobs: S
6569 sdata_blobs .pl .render_shapes (element = "blobs_circles" , outline_alpha = 1 ).pl .show ()
6670
6771 def test_plot_can_render_circles_with_specified_outline_width (self , sdata_blobs : SpatialData ):
68- sdata_blobs .pl .render_shapes (element = "blobs_circles" , outline_width = 3.0 ).pl .show ()
72+ sdata_blobs .pl .render_shapes (element = "blobs_circles" , outline_alpha = 1 , outline_width = 3.0 ).pl .show ()
6973
7074 def test_plot_can_render_multipolygons (self ):
7175 def _make_multi ():
@@ -402,19 +406,23 @@ def test_plot_datashader_can_render_with_diff_alpha_outline(self, sdata_blobs: S
402406 sdata_blobs .pl .render_shapes (method = "datashader" , element = "blobs_polygons" , outline_alpha = 0.5 ).pl .show ()
403407
404408 def test_plot_datashader_can_render_with_diff_width_outline (self , sdata_blobs : SpatialData ):
405- sdata_blobs .pl .render_shapes (method = "datashader" , element = "blobs_polygons" , outline_width = 5.0 ).pl .show ()
409+ sdata_blobs .pl .render_shapes (
410+ method = "datashader" , element = "blobs_polygons" , outline_alpha = 1.0 , outline_width = 5.0
411+ ).pl .show ()
406412
407413 def test_plot_datashader_can_render_with_colored_outline (self , sdata_blobs : SpatialData ):
408- sdata_blobs .pl .render_shapes (method = "datashader" , element = "blobs_polygons" , outline_color = "red" ).pl .show ()
414+ sdata_blobs .pl .render_shapes (
415+ method = "datashader" , element = "blobs_polygons" , outline_alpha = 1 , outline_color = "red"
416+ ).pl .show ()
409417
410418 def test_plot_datashader_can_render_with_rgb_colored_outline (self , sdata_blobs : SpatialData ):
411419 sdata_blobs .pl .render_shapes (
412- method = "datashader" , element = "blobs_polygons" , outline_color = (0.0 , 0.0 , 1.0 )
420+ method = "datashader" , element = "blobs_polygons" , outline_alpha = 1 , outline_color = (0.0 , 0.0 , 1.0 )
413421 ).pl .show ()
414422
415423 def test_plot_datashader_can_render_with_rgba_colored_outline (self , sdata_blobs : SpatialData ):
416424 sdata_blobs .pl .render_shapes (
417- method = "datashader" , element = "blobs_polygons" , outline_color = (0.0 , 1.0 , 0.0 , 1.0 )
425+ method = "datashader" , element = "blobs_polygons" , outline_alpha = 1 , outline_color = (0.0 , 1.0 , 0.0 , 1.0 )
418426 ).pl .show ()
419427
420428 def test_plot_can_set_clims_clip (self , sdata_blobs : SpatialData ):
@@ -593,6 +601,12 @@ def test_plot_can_render_multipolygons_to_square(self, sdata_blobs: SpatialData)
593601 def test_plot_can_render_multipolygons_to_circle (self , sdata_blobs : SpatialData ):
594602 sdata_blobs .pl .render_shapes (element = "blobs_multipolygons" , shape = "circle" ).pl .show ()
595603
604+ def test_plot_visium_hex_hexagonal_grid (self , sdata_hexagonal_grid_spots : SpatialData ):
605+ _ , axs = plt .subplots (nrows = 1 , ncols = 2 , layout = "tight" )
606+
607+ sdata_hexagonal_grid_spots .pl .render_shapes (element = "spots" , shape = "circle" ).pl .show (ax = axs [0 ])
608+ sdata_hexagonal_grid_spots .pl .render_shapes (element = "spots" , shape = "visium_hex" ).pl .show (ax = axs [1 ])
609+
596610 def test_plot_datashader_can_render_circles_to_hex (self , sdata_blobs : SpatialData ):
597611 sdata_blobs .pl .render_shapes (element = "blobs_circles" , shape = "hex" , method = "datashader" ).pl .show ()
598612
@@ -616,6 +630,7 @@ def test_plot_datashader_can_render_multipolygons_to_square(self, sdata_blobs: S
616630
617631 def test_plot_datashader_can_render_multipolygons_to_circle (self , sdata_blobs : SpatialData ):
618632 sdata_blobs .pl .render_shapes (element = "blobs_multipolygons" , shape = "circle" , method = "datashader" ).pl .show ()
633+
619634 def test_plot_can_render_shapes_with_double_outline (self , sdata_blobs : SpatialData ):
620635 sdata_blobs .pl .render_shapes ("blobs_circles" , outline_width = (10.0 , 5.0 )).pl .show ()
621636
@@ -631,7 +646,10 @@ def test_plot_can_render_double_outline_with_diff_alpha(self, sdata_blobs: Spati
631646
632647 def test_plot_outline_alpha_takes_precedence (self , sdata_blobs : SpatialData ):
633648 sdata_blobs .pl .render_shapes (
634- element = "blobs_circles" , outline_color = ("#ff660033" , "#33aa0066" ), outline_width = (20 , 10 ), outline_alpha = 1.0
649+ element = "blobs_circles" ,
650+ outline_color = ("#ff660033" , "#33aa0066" ),
651+ outline_width = (20 , 10 ),
652+ outline_alpha = (1.0 , 1.0 ),
635653 ).pl .show ()
636654
637655 def test_plot_datashader_can_render_shapes_with_double_outline (self , sdata_blobs : SpatialData ):
0 commit comments