2013-01-04 3 views
4

Je construis un igraph et j'aime pouvoir changer la couleur et la taille de police du titre du graphique.changez la police et la couleur du titre de l'igraph

dput(df) 
structure(list(Month = structure(c(15248, 15522), class = "Date"), 
    Value = c(1, 3)), .Names = c("Month", "Value"), row.names = 1:2, class = "data.frame") 

g <- graph.data.frame(df) 

plot(g, layout = layout.kamada.kawai, vertex.label = V(g)$name, vertex.label.color= "white",edge.arrow.size=0.5, edge.curved=T, edge.label=E(g)$Freq, edge.label.color="pink", edge.label.font=5,vertex.shape="circle",edge.color="white", vertex.color="red", asp=0, main="This is my first igraph") 

Répondre

9

Supprimer l'argument main="..." de la fonction plot() et après utilisation plot(...) fonction title()cex.main= définit la taille et la couleur cex.col= ensembles.

plot(g, layout = layout.kamada.kawai, vertex.label = V(g)$name, vertex.label.color= "white",edge.arrow.size=0.5, edge.curved=T, edge.label=E(g)$Freq, edge.label.color="pink", edge.label.font=5,vertex.shape="circle",edge.color="white", vertex.color="red", asp=0) 
title("This is my first igraph",cex.main=3,col.main="green") 
Questions connexes