| wdesr_ggplot_graph | R Documentation |
A wrapper for ggplot2 to plot graph as returned by wdesr_get_graph.
wdesr_ggplot_graph(
df.g,
layout = igraph::with_kk,
size = 1,
node_sizes = c(10, 30),
label_sizes = c(4, 6),
node_label = "alias",
node_type = "text",
edge_label = TRUE,
edge_arrow = FALSE,
arrow_gap = 0.05,
size_guide = "none",
legend_position = "right",
margin_x = 0.2,
margin_y = 0.03,
label_wrap = 20
)
df.g |
A data representing a graph, as returned by wdesr_get_graph. |
layout |
The layout to use in the graph computing |
size |
A multiplier of all of the other sizes (default to 1.0) |
node_sizes |
The size of the nodes, either a single value or a range c(min,max). |
label_sizes |
The size of the nodes, either a single value or a range c(min,max). |
node_label |
Define the label for the nodess. Either "alias", "alias_date", "long", or "long_date" (default to "alias"). |
node_type |
Define the type of drawing for the nodes. Either "text", "text_repel", "label", "label_repel", "node" or "none" (default to "text"). |
edge_label |
TRUE to plot dates on edges (default to "TRUE"). |
edge_arrow |
TRUE or arrow object to plot arrow on edges, FALSE otherwise (default to "FALSE"). |
arrow_gap |
A parameter that will shorten the network edges in order to avoid overplotting edge arrows and nodes see |
size_guide |
TRUE to plot the guide for sizes (default to "FALSE"). |
legend_position |
The position of the legend, "none" to remove (default to "right"). |
margin_x |
The horizontal margins, useful for big nodes (defautl to 0.2). |
margin_y |
The vertical margins, useful for long node texts (default to 0.03). |
label_wrap |
The number of charaters to wrap labels (default to 20). |
A ggplot2.
Julien Gossa, gossa@unistra.fr
wdesr_clear_cache
df.aslace <- wdesr_get_graph("Q61716176",c('composante','associƩ'), 1)
wdesr_ggplot_graph(df.alsace,
node_size = c(10,30), label_sizes = c(3,5), arrow_gap = 0.0,
node_label = "alias", node_type = "text",
edge_label = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.