Creates a `ggplot` plot where numeric data, mapped to structures, fill the segmentation shapes in a colour scale
seg_feature_plot(
segmentation,
feature,
assay,
projection = NULL,
plane = "sagittal",
by = NULL,
aggr_fun = NULL,
rng = NULL,
smooth = TRUE,
smoothness = 3,
minsize = 10,
color_pal = NULL,
show_side = "both",
show_labels = TRUE,
labelsize = 2,
remove_axes = TRUE
)
a segmentation
class object.
character, feature to be plotted from the assay
slot.
character, the name of the assay
slot in the segmentation
.
Character, name of the maximum projection slot to be used? Default is NULL
, which uses the same name as selected in assay
.
character, the plane for the maximum projection. Default is "sagittal".
character with two elements, [1] the name of the column in the sampledata
of the assay
to be used for subsetting and aggregating and [2] the value to which the column in [1] should be equal to
function, the function to be used to aggregate samples across rows when using by
numeric with two elements with lower and upper bound for the color scale. Default is NULL
logical, should shapes be smoothed? Default is TRUE
.
numeric, the smoothing to be used. Default is 3.
numeric, minimum number of vertices to draw a polygon. Default is 10.
character, the color palette to be used. The default is the `Sunset` palette from colorspace
character, the side of the projection to be plotted. one of "first" ,"second", or "both". Default is "both".
logical, should segmentation labels be shown? Default is TRUE
numeric, the size of the labels. Default is 2.
logical, should axes be shown? Default is FALSE
a `ggplot` plot in which structures are coloured according to a numeric value