spatDimPlot2D#
Last Updated: Oct 02, 2023
Description#
Visualize cells according to spatial AND dimension reduction coordinates 2D
Usage#
spatDimPlot2D(
gobject,
spat_unit = NULL,
feat_type = NULL,
show_image = F,
gimage = NULL,
image_name = NULL,
largeImage_name = NULL,
spat_loc_name = NULL,
plot_alignment = c("vertical", "horizontal"),
dim_reduction_to_use = "umap",
dim_reduction_name = NULL,
dim1_to_use = 1,
dim2_to_use = 2,
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,
dim_point_shape = c("border", "no_border"),
dim_point_size = 1,
dim_point_alpha = 1,
dim_point_border_col = "black",
dim_point_border_stroke = 0.1,
spat_point_shape = c("border", "no_border", "voronoi"),
spat_point_size = 1,
spat_point_alpha = 1,
spat_point_border_col = "black",
spat_point_border_stroke = 0.1,
dim_show_cluster_center = F,
dim_show_center_label = T,
dim_center_point_size = 4,
dim_center_point_border_col = "black",
dim_center_point_border_stroke = 0.1,
dim_label_size = 4,
dim_label_fontface = "bold",
spat_show_cluster_center = F,
spat_show_center_label = F,
spat_center_point_size = 4,
spat_center_point_border_col = "blue",
spat_center_point_border_stroke = 0.1,
spat_label_size = 4,
spat_label_fontface = "bold",
show_NN_network = F,
nn_network_to_use = "sNN",
network_name = "sNN.pca",
nn_network_alpha = 0.05,
show_spatial_network = F,
spat_network_name = "Delaunay_network",
spat_network_color = "blue",
spat_network_alpha = 0.5,
show_spatial_grid = F,
spat_grid_name = "spatial_grid",
spat_grid_color = "blue",
show_other_cells = T,
other_cell_color = "lightgrey",
dim_other_point_size = 1,
spat_other_point_size = 1,
spat_other_cells_alpha = 0.5,
dim_show_legend = F,
spat_show_legend = F,
legend_text = 10,
legend_symbol_size = 2,
dim_background_color = "white",
spat_background_color = "white",
vor_border_color = "white",
vor_max_radius = 200,
vor_alpha = 1,
axis_text = 8,
axis_title = 8,
show_plot = NA,
return_plot = NA,
save_plot = NA,
save_param = list(),
default_save_name = "spatDimPlot2D"
)
Arguments#
|
giotto object |
|
spatial unit |
|
feature type |
|
show a tissue background image |
|
a giotto image |
|
name of a giotto image |
|
name of a giottoLargeImage |
|
name of spatial locations |
|
direction to align plot |
|
dimension reduction to use |
|
dimension reduction name |
|
dimension to use on x-axis |
|
dimension to use on y-axis |
|
= spatial dimension to use on x-axis |
|
= spatial dimension to use on y-axis |
|
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 |
|
point with border or not (border or no_border) |
|
size of points in dim. reduction space |
|
transparancy of point in dim. reduction space |
|
border color of points in dim. reduction space |
|
border stroke of points in dim. reduction space |
|
shape of points (border, no_border or voronoi) |
|
size of spatial points |
|
transparancy of spatial points |
|
border color of spatial points |
|
border stroke of spatial points |
|
show the center of each cluster |
|
provide a label for each cluster |
|
size of the center point |
|
border color of center point |
``dim_center_point_border_stroke` ` |
stroke size of center point |
|
size of the center label |
|
font of the center label |
|
show the center of each cluster |
|
provide a label for each cluster |
|
size of the center point |
|
border color of spatial center points |
``spat_center_point_border_stroke `` |
border strike size of spatial center points |
|
size of the center label |
|
font of the center label |
|
show underlying NN network |
|
type of NN network to use (kNN vs sNN) |
|
name of NN network to use, if show_NN_network = TRUE |
|
column to use for alpha of the edges |
|
show 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 |
|
size of not selected dim cells |
|
size of not selected spat cells |
|
alpha of not selected spat cells |
|
show legend of dimension reduction plot |
|
show legend of spatial plot |
|
size of legend text |
|
size of legend symbols |
|
background color of points in dim. reduction space |
|
background color of spatial points |
|
border colorr for voronoi plot |
|
maximum radius for voronoi ‘cells’ |
|
transparancy of voronoi ‘cells’ |
|
size of axis text |
|
size of axis title |
|
show plot |
|
return ggplot object |
|
directly save the plot [boolean] |
|
list of saving parameters, see
|
|
default save name for saving, don’t change, change save_name in save_param |
Details#
Description of parameters.
Value#
ggplot
See Also#
spatDimPlot3D
Other spatial and dimension reduction visualizations:
spatDimPlot3D()
, spatDimPlot()