Visualize cells according to spatial coordinates
spatPlot2D(
gobject,
show_image = F,
gimage = NULL,
image_name = "image",
group_by = NULL,
group_by_subset = NULL,
sdimx = "sdimx",
sdimy = "sdimy",
spat_enr_names = NULL,
cell_color = NULL,
color_as_factor = T,
cell_color_code = NULL,
cell_color_gradient = c("blue", "white", "red"),
gradient_midpoint = NULL,
gradient_limits = NULL,
select_cell_groups = NULL,
select_cells = NULL,
point_shape = c("border", "no_border", "voronoi"),
point_size = 3,
point_alpha = 1,
point_border_col = "black",
point_border_stroke = 0.1,
show_cluster_center = F,
show_center_label = F,
center_point_size = 4,
center_point_border_col = "black",
center_point_border_stroke = 0.1,
label_size = 4,
label_fontface = "bold",
show_network = F,
spatial_network_name = "Delaunay_network",
network_color = NULL,
network_alpha = 1,
show_grid = F,
spatial_grid_name = "spatial_grid",
grid_color = NULL,
show_other_cells = T,
other_cell_color = "lightgrey",
other_point_size = 1,
other_cells_alpha = 0.1,
coord_fix_ratio = NULL,
title = NULL,
show_legend = T,
legend_text = 8,
legend_symbol_size = 1,
background_color = "white",
vor_border_color = "white",
vor_max_radius = 200,
vor_alpha = 1,
axis_text = 8,
axis_title = 8,
cow_n_col = 2,
cow_rel_h = 1,
cow_rel_w = 1,
cow_align = "h",
show_plot = NA,
return_plot = NA,
save_plot = NA,
save_param = list(),
default_save_name = "spatPlot2D"
)
giotto object
show a tissue background image
a giotto image
name of a giotto image
create multiple plots based on cell annotation column
subset the group_by factor column
x-axis dimension name (default = 'sdimx')
y-axis dimension name (default = 'sdimy')
names of spatial enrichment results to include
color for cells (see details)
convert color column to factor
named vector with colors
vector with 3 colors for numeric data
midpoint for color gradient
vector with lower and upper limits
select subset of cells/clusters based on cell_color parameter
select subset of cells based on cell IDs
shape of points (border, no_border or voronoi)
size of point (cell)
transparancy of point
color of border around points
stroke size of border around points
plot center of selected clusters
plot label of selected clusters
size of center points
border color of center points
border stroke size of center points
size of labels
font of labels
show underlying spatial network
name of spatial network to use
color of spatial network
alpha of spatial network
show spatial grid
name of spatial grid to use
color of spatial grid
display not selected cells
color of not selected cells
point size of not selected cells
alpha of not selected cells
fix ratio between x and y-axis
title of plot
show legend
size of legend text
size of legend symbols
color of plot background
border colorr for voronoi plot
maximum radius for voronoi 'cells'
transparancy of voronoi 'cells'
size of axis text
size of axis title
cowplot param: how many columns
cowplot param: relative height
cowplot param: relative width
cowplot param: how to align
show plot
return ggplot object
directly save the plot [boolean]
list of saving parameters, see showSaveParameters
default save name for saving, don't change, change save_name in save_param
ggplot
Description of parameters.
Other spatial visualizations:
spatPlot3D()
,
spatPlot()
data(mini_giotto_single_cell)
spatPlot2D(mini_giotto_single_cell)
spatPlot2D(mini_giotto_single_cell, cell_color = 'cell_types', point_size = 3)