igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Ratio between size of vertex in Igraph and size of points i


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

Thank you very much, Gábor! It is clear how it works now!

Best,

Charles

On Wed, May 22, 2013 at 7:46 PM, Gábor Csárdi <address@hidden> wrote:
> Hi Charles,
>
> you need to supply the layout explicitly to the function, set rescale=FALSE
> as well, and maybe also set xlim and ylim, e.g.:
>
> coords <- layout.auto(gtest)
> plot(gtest, layout=coords, rescale=FALSE, xlim=range(coords[,1]),
> ylim=range(coords[,2]))
>
> G.
>
>
>
> On Wed, May 22, 2013 at 12:18 PM, Charles Novaes de Santana
> <address@hidden> wrote:
>>
>> 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
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
>
>
> --
> Gabor Csardi <address@hidden>     MTA KFKI RMKI
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
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]