vertex.frame.color

Cause I want to delete the frame of the vertexes, so I used this command : vertex.frame.color=NA. But it didn’t work for triangle, star and so on, only worked for circle, square, tangle. So how can I do to delete the frame of the vertex with the shape of star and triangle?

Can you show a minimal reproducible example?

I used the test example

shapes <- setdiff(shapes(), "")
g <- make_ring(length(shapes))
V(g)$frame.color <- NA
set.seed(42)
plot(g, vertex.shape=shapes, vertex.label=shapes, vertex.label.dist=1,
     vertex.size=15, vertex.size2=15,
     vertex.pie=lapply(shapes, function(x) if (x=="pie") 2:6 else 0),
     vertex.pie.color=list(heat.colors(5)))

and I got this fig

triangle and star are custom vertex shapes that are not in igraph by default; their code is specified inline in the example. As you can see from the code, these vertex shapes do not make into account the vertex.frame.color parameter to keep the example relatively short (it’s already too long for an example in my opinion, though).

If you want these custom shapes to take into account the frame color, you’ll need to copy something like this from the code of the existing built-in shape handlers:

    vertex.frame.color <- params("vertex", "frame.color")
    if (length(vertex.frame.color) != 1 && !is.null(v)) {
        vertex.frame.color <- vertex.frame.color[v]
    }

and then you need to pass vertex.frame.color to the appropriate symbols() call within the custom triangle / star drawing function.

Take a look at the source code of the .igraph.shape.circle.plot() internal function here for inspiration.

Thanks a lot. I have solved it! Just as you said.