Display of a diagram representing the network structure of a GRiwrm object

# S3 method for GRiwrm
plot(
  x,
  display = TRUE,
  orientation = "LR",
  width = "100%",
  height = "100%",
  ...
)

Arguments

x

[GRiwrm object] data to display. See CreateGRiwrm for details

display

logical if TRUE displays the diagram with DiagrammeR::mermaid, returns the mermaid code otherwise

orientation

character orientation of the graph. Possible values are "LR" (left-right), "RL" (right-left), "TB" (top-bottom), or "BT" (bottom-top). "LR" by default

width

numeric width of the resulting graphic in pixels (See DiagrammeR::mermaid)

height

numeric height of the resulting graphic in pixels (See DiagrammeR::mermaid)

...

Other arguments and parameters you would like to send to JavaScript (See DiagrammeR::mermaid)

Value

Mermaid code of the diagram if display is FALSE, otherwise the function returns the diagram itself.

Details

This function only works inside RStudio because the HTMLwidget produced by DiagrammeR is not handled on some platforms

Examples

if (FALSE) {
# Display diagram
plot.GRiwrm(griwrm)
# Is the same as
DiagrammeR::mermaid(plot.GRiwrm(griwrm, display = FALSE), width = "100%", height = "100%")
}