View source: R/network_visualization.R
plot_dynamic_networks | R Documentation |
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
)
network_table |
The weight data table of network. |
celltypes_order |
The order of cell types. |
ntop |
The number of top genes to plot. |
title |
The title of figure. |
theme_type |
Default is |
plot_type |
Default is |
layout |
Default is |
nrow |
The number of rows of figure. |
figure_save |
Default is |
figure_name |
The name of figure file. |
figure_width |
The width of figure. |
figure_height |
The height of figure. |
seed |
Default is |
A dynamic figure object
data("example_matrix")
network <- inferCSN(example_matrix)[1:100, ]
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"
)
## Not run:
# 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"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.