igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Ratio between size of vertex in Igraph and size of points in R


From: Charles Novaes de Santana
Subject: [igraph] Ratio between size of vertex in Igraph and size of points in R
Date: Wed, 22 May 2013 18:18:43 +0200

Dear list,

I am trying to combine the plot of a network and the plot of some
points in the same plot (I want to plot the "legend" of the network,
associating the sizes of the nodes to some characteristics of my
phenomena). To do it, I am using the function "points" of package
"graphics" in R. But I am facing some difficulties to define the size
of the points I am plotting. Is there any ratio between the size of a
point plotted with igraph (the vertex of a network) and the size of a
point plotted with other functions of R (for example, the function
"points")?

An example:

library(igraph)

mat<-matrix(0,nrow=2,ncol=2)
mat[1,2]<-1
gtest<-graph.adjacency(mat)
plot(gtest,vertex.size=c(10,20),vertex.color=c("blue","red"))
points(0,0,pch=19,cex=10,col="green")

I supposed that if the sizes used to both, igraph and R, were the
same, the size of the green point would be the same of the blue node
of the network. But I was wrong.

Any help is much appreciated!

Best regards,

Charles
-- 
Um axé! :)

--
Charles Novaes de Santana
http://www.imedea.uib-csic.es/~charles
PhD student - Global Change
Laboratorio Internacional de Cambio Global
Department of Global Change Research
Instituto Mediterráneo de Estudios Avanzados(CSIC/UIB)
Calle Miquel Marques 21, 07190
Esporles - Islas Baleares - España

Office phone - +34 971 610 896
Cell phone - +34 660 207 940



reply via email to

[Prev in Thread] Current Thread [Next in Thread]