variable vertex font size in igraph

19,579

Solution 1

Yes it is possible. V(g)$label.cex is what you're after. See this blog post of mine for an example how: http://trinkerrstuff.wordpress.com/2012/06/30/igraph-and-sna-an-amateurs-dabbling/

May I suggest next post you provide a reproducible example and you'll likely get much better assistance.

Solution 2

Yes you're right Tyler, my bad. Added an example to the question

And your solution would be something like this?

V(g1)$label.cex = 1
V(g1)$label.cex[1:20 %% 2 == 0] = 0.5

does this method apply to all vertex and edge attributes as well?

Share:
19,579
Buthetleon
Author by

Buthetleon

Updated on July 22, 2022

Comments

  • Buthetleon
    Buthetleon almost 2 years

    Is it possible have vertex labels of variable font sizes. labelling certain nodes with a bigger font size than others

    g1 <- erdos.renyi.game(20, 2/20)
    V(g1)$name<-letters[1:vcount(g1)]
    plot(g1,vertex.label=V(g1)$name)
    

    Understand there is a vertex.label.cex option in igraph.plot but it is global.