View source: R/04_flowgraph_plots.R
plot_gr | R Documentation |
Plots a cell hierarchy given the output from fg_plot
, a list of nodes and edges.
plot_gr(
gr,
main = NULL,
show_bgedges = TRUE,
colour_palette = NULL,
label_coloured = TRUE,
shiny_plot = FALSE,
interactive = FALSE,
visNet_plot = TRUE,
colour_edges = FALSE,
...
)
gr |
A list containing data frames |
main |
A string containing the plot title. If this is set to NULL, the
function will look for a plot title in the |
show_bgedges |
A logical variable indicating whether or not
edges not specified for plotting should be plotted as light grey
in the background. If this is |
colour_palette |
A colour palette e.g. the default palette if the user
sets this to |
label_coloured |
A logical indicating whether to colour the node labels using the same colours as the nodes in the non-interactive plot. |
shiny_plot |
A logical indicating whether this plot is made for shiny; users don't need to change this. |
interactive |
A logical variable indicating whether the plot should be
an interactive plot; see package |
visNet_plot |
A logical variable indicating if an interactive plot is
chosen, if function should output a visNetwork plot; if set to |
colour_edges |
A logical variable indicating whether to colour edges if plotting a node feature summary. |
... |
Other parameters for |
A ggplot
object if interactive
is set to FALSE
;
a ggiraph
object if interactive
is set to TRUE
.
flowGraph-class
fg_plot
get_phen_meta
ggdf
fg_get_feature
fg_get_summary
no_cores <- 1
data(fg_data_pos2)
fg <- flowGraph(fg_data_pos2$count, class=fg_data_pos2$meta$class,
no_cores=no_cores)
# fg <- fg_summary(fg, no_cores=no_cores, class="class", control="control",
# overwrite=FALSE, test_name="t_byLayer", diminish=FALSE)
gr_summary <- fg_plot(
fg, type="node", p_thres=.05, show_bgedges=TRUE,
path=NULL) # set path to a full path to save plot as a PNG
plot_gr(gr_summary, main=gr_summary$main, show_bgedges=TRUE)
plot_gr(gr_summary, main=gr_summary$main, show_bgedges=TRUE, interactive=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.