View source: R/territory_plot.R
territory_plot | R Documentation |
territory_plot - plotting Vesalius territories
territory_plot(
vesalius_assay,
trial = "last",
split = FALSE,
highlight = NULL,
contour = "None",
randomise = TRUE,
cex = 10,
cex_pt = 1,
alpha = 0.65,
use_image = FALSE
)
vesalius_assay |
a vesalius_Assay object |
trial |
character string describing which segmentation trial to use. Default is "last" which is the last segmentation trial used. |
split |
logical - If TRUE, territories will be plotted in separate panels |
highlight |
numeric vector describing which territories should be highlighted. |
contour |
if territory contours should be added. Availble: "None", "convex", "concave" |
randomise |
logical - If TRUE, colour palette will be randomised. |
cex |
numeric describing font size multiplier. |
cex_pt |
numeric describing point size multiplier. |
alpha |
opacity factor ]0,1[ |
Territory plots show all territories in false colour after they have been isolated from a Vesalius image.
Note that this function can be applied to image segments, territories, and layers.
a ggplot object
## Not run:
data(vesalius)
# First we build a simple object
ves <- build_vesalius_object(coordinates, counts)
# We can do a simple run
ves <- build_vesalius_embeddings(ves)
# simple smoothing
ves <- smooth_image(ves, dimensions = seq(1, 30))
# quick segmentation
ves <- segment_image(ves, dimensions = seq(1, 30))
# isolate territories
ves <- isolate_territories(ves)
# Plot Territories
p <- territory_plot(ves)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.