| set_gpar | R Documentation | 
netplot objectSet/retrieve graphical parameters of a netplot object
set_gpar(x, type, element, idx, ...)
set_edge_gpar(x, element, idx, ...)
set_vertex_gpar(x, element, idx, ...)
get_vertex_gpar(x, element, ..., idx)
get_edge_gpar(x, element, ..., idx)
get_gpar(x, type, element, ..., idx, simplify = TRUE)
| x | An object of class  | 
| type | Character. Either  | 
| element | Character. If  | 
| idx | (optional) Integer vector. Indices of the elements to be modified. When missing, all elements are modified. | 
| ... | Parameters to be modified/retrieved. This is passed to grid::editGrob via grid::gpar. | 
| simplify | Logical. When  | 
set_edge_gpar and set_vertex_gpar are shorthands for
set_gpar(type = "edge", ...) and set_gpar(type = "vertex", ...)
respectively.
get_edge_gpar and get_vertex_gpar are shorthands for
get_gpar(type = "edge", ...) and get_gpar(type = "vertex", ...)
respectively.
An object of class netplot with modified parameters.
library(igraph)
library(netplot)
x <- make_ring(5)
g <- nplot(x)
# Updating edge color
g <- set_edge_gpar(g, col = "gray80")
# Retrieving the color of the vertices (core)
get_vertex_gpar(g, element = "core", "fill", "lwd")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.