sparrow.pl.plot_labels#
- sparrow.pl.plot_labels(sdata, labels_layer='segmentation_mask', z_slice=None, crd=None, to_coordinate_system='global', output=None, **kwargs)#
Plot a labels layer (masks) based on given parameters.
- Parameters:
sdata (
SpatialData) – Data containing spatial information for plotting.labels_layer (
str(default:'segmentation_mask')) – Labels layer to be plotted. Default is “segmentation_mask”.z_slice (
float|None(default:None)) – The z_slice to visualize in case of 3D (c,z,y,x) labels.crd (
tuple[int,int,int,int] |None(default:None)) – The coordinates for the region of interest in the format(xmin, xmax, ymin, ymax). IfNone, the entire image is considered, by defaultNone.to_coordinate_system (
str(default:'global')) – Coordinate system to plot.output (
str|Path|None(default:None)) – Path to save the plot. If not provided, plot will be displayed.**kwargs (
dict[str,Any]) – Additional arguments to be passed to thesparrow.pl.plot_shapes()function.
- Return type:
None
See also
sparrow.pl.plot_shapes,sparrow.pl.plot