You can modify the color and width of the borders of the vertices using the vertex.border
and vertex.border.width
arguments in the plot()
or igraph.plot()
function.
Here's an example code to modify the color and width of the vertex borders in an R graph plot:
library(igraph)
# create a sample graph with 5 vertices
g <- make_empty_graph(5) +
add_edges(c(1,2, 2,3, 3,4, 4,5, 5,1))
# plot the graph and modify vertex border color and width
plot(g, vertex.border = "blue", vertex.border.width = 2)
In this code, the vertex.border
argument sets the color of the vertex borders to blue, and the vertex.border.width
argument sets the width of the borders to 2. You can modify these values to set the desired color and width.
Asked: 2023-04-28 20:46:27 +0000
Seen: 11 times
Last updated: Apr 28 '23