|
3 | 3 | import numpy as np
|
4 | 4 | import scanpy as sc
|
5 | 5 | import spatialdata_plot # noqa: F401
|
| 6 | +from matplotlib import pyplot as plt |
6 | 7 | from matplotlib.colors import Normalize
|
7 | 8 | from spatial_image import to_spatial_image
|
8 | 9 | from spatialdata import SpatialData
|
@@ -70,11 +71,15 @@ def test_plot_can_render_two_channels_str_from_multiscale_image(self, sdata_blob
|
70 | 71 | sdata_blobs_str.pl.render_images(element="blobs_multiscale_image", channel=["c1", "c2"]).pl.show()
|
71 | 72 |
|
72 | 73 | def test_plot_can_pass_vmin_vmax(self, sdata_blobs: SpatialData):
|
73 |
| - sdata_blobs.pl.render_images(element="blobs_image", channel=1, vmin=0, vmax=0.4).pl.show() |
| 74 | + fig, axs = plt.subplots(ncols=2, figsize=(6, 3)) |
| 75 | + sdata_blobs.pl.render_images(element="blobs_image", channel=1).pl.show(ax=axs[0]) |
| 76 | + sdata_blobs.pl.render_images(element="blobs_image", channel=1, vmin=0, vmax=0.4).pl.show(ax=axs[1]) |
74 | 77 |
|
75 | 78 | def test_plot_can_pass_normalize(self, sdata_blobs: SpatialData):
|
| 79 | + fig, axs = plt.subplots(ncols=2, figsize=(6, 3)) |
76 | 80 | norm = Normalize(vmin=0, vmax=0.4, clip=True)
|
77 |
| - sdata_blobs.pl.render_images(element="blobs_image", channel=1, norm=norm).pl.show() |
| 81 | + sdata_blobs.pl.render_images(element="blobs_image", channel=1).pl.show(ax=axs[0]) |
| 82 | + sdata_blobs.pl.render_images(element="blobs_image", channel=1, norm=norm).pl.show(ax=axs[1]) |
78 | 83 |
|
79 | 84 | def test_plot_can_pass_color_to_single_channel(self, sdata_blobs: SpatialData):
|
80 | 85 | sdata_blobs.pl.render_images(element="blobs_image", channel=1, palette="red").pl.show()
|
|
0 commit comments