Plot dynamic networks
plot_dynamic_networks(
network_table,
celltypes_order,
ntop = 10,
title = NULL,
theme_type = "theme_void",
plot_type = "ggplot",
layout = "fruchtermanreingold",
nrow = 2,
figure_save = FALSE,
figure_name = NULL,
figure_width = 6,
figure_height = 6,
seed = 1
)
The weight data table of network.
The order of cell types.
The number of top genes to plot.
The title of figure.
Default is theme_void
, the theme of figure,
could be theme_void
, theme_blank
or theme_facet
.
Default is "ggplot"
, the type of figure,
could be ggplot
, animate
or ggplotly
.
Default is "fruchtermanreingold"
, the layout of figure,
could be fruchtermanreingold
or kamadakawai
.
The number of rows of figure.
Default is FALSE
,
Logical value, whether to save the figure file.
The name of figure file.
The width of figure.
The height of figure.
Default is 1
, the seed random use to plot network.
A dynamic figure object
data("example_matrix")
network <- inferCSN(example_matrix)[1:100, ]
#> ✔ Running for <dense matrix>.
#> ✔ Checking input parameters.
#> ✔ Using L0 sparse regression model.
#> ✔ Using 1 core.
#> ✔ Run done.
network$celltype <- c(
rep("cluster1", 20),
rep("cluster2", 20),
rep("cluster3", 20),
rep("cluster5", 20),
rep("cluster6", 20)
)
celltypes_order <- c(
"cluster5", "cluster3",
"cluster2", "cluster1",
"cluster6"
)
plot_dynamic_networks(
network,
celltypes_order = celltypes_order
)
plot_dynamic_networks(
network,
celltypes_order = celltypes_order[1:3]
)
plot_dynamic_networks(
network,
celltypes_order = celltypes_order,
plot_type = "ggplotly"
)
if (FALSE) { # \dontrun{
# If setting `plot_type = "animate"` to plot and save `gif` figure,
# please install `gifski` package first.
plot_dynamic_networks(
network,
celltypes_order = celltypes_order,
plot_type = "animate"
)
} # }