plot.tmiic | R Documentation |
This function calls export
to build a plottable
object from the result returned by miic
in temporal mode
and plot it.
## S3 method for class 'tmiic'
plot(
x,
method = "igraph",
pcor_palette = NULL,
display = "compact",
show_self_loops = TRUE,
positioning_for_grid = "greedy",
orientation_for_grid = "L",
...
)
x |
[a tmiic object, required] The object returned by |
method |
[a string, optional, default value "igraph"] The plotting method, currently only "igraph" is supported. |
pcor_palette |
[a color palette, optional, default value grDevices::colorRampPalette(c("blue", "darkgrey", "red")] Used to represent the partial correlations (the color of the edges). The palette must be able to handle 201 shades to cover the correlation range from -100 to +100. |
display |
[a string, optional, default value "compact"] Possible values are "raw", "lagged", "compact", "combine", "unique", "drop":
|
show_self_loops |
[a boolean, optional, TRUE by default] When TRUE, the lagged edges starting and ending on the same node are included in the igraph object. When FALSE, only edges having different nodes are present in the igraph object. |
positioning_for_grid |
[a string, optional, "greedy" by default] Used only when the display is "raw" or "lagged" and no layout is supplied. Possible values are "none", "alphabetical", "layers", "greedy" and "sugiyama"
|
orientation_for_grid |
[a string, optional, "L" by default] Used only when the display is "raw" or "lagged and no layout is supplied. Indicates the orientation of the draw, possible values are landscape: "L" or portrait: "P". |
... |
Additional plotting parameters. See the corresponding plot function for the complete list. For igraph, see |
See the documentation of export
for further
details.
export
for graphical exports,
igraph.plotting
library(miic)
#' # EXAMPLE COVID CASES (time series demo)
data(covidCases)
# execute MIIC (reconstruct graph in temporal mode)
tmiic_obj <- miic(input_data = covidCases, mode = "TS", n_layers = 3, delta_t = 1, mov_avg = 14)
# to plot the default compact graph
if(require(igraph)) {
plot(tmiic_obj)
}
# to plot the raw temporal network
if(require(igraph)) {
plot(tmiic_obj, display="raw")
}
# to plot the full temporal network
if(require(igraph)) {
plot(tmiic_obj, display="lagged")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.