igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] changing widht and height of the igraph


From: Gábor Csárdi
Subject: Re: [igraph] changing widht and height of the igraph
Date: Tue, 9 Oct 2012 13:15:00 -0400

To make this clear, the problem I think is probably not with the size
of the PNG image, because that should be 1200x600 pixels, although
your code snipplet has some typos, e.g. quotes are missing around
"network.png".

So I think the question is about how to produce an igraph layout on a
rectangle, instead of a square or disc. I don't think we have any
layout algorithm that supports that, unfortunately. (But I might be
wrong, I haven't look over all of them now.) The force directed
algorithms typically just place the vertices "somewhere" on a plane,
and then because of symmetries, the vertices are typically within a
circle.

Another thing is that igraph rescales the results of the layout
algorithm to the [-1,1] x [-1,1] box, and by default uses an aspect
ratio of one. To change this behavior, you can set 'rescale=FALSE' and
'asp=0' when plotting the graph. You'll likely need to set 'xlim' and
'ylim' as well in this case.

Gabor

On Tue, Oct 9, 2012 at 10:26 AM, Mike Dylan <address@hidden> wrote:
> I need to write the output of the igraph to a .png file, I am doing this:
>
> png(network.png height=600, width=1200)
>   plot(g, layout = layout.fruchterman.reingold,  vertex.label = V(g)$name,
> vertex.label.color= "navyblue",  edge.arrow.size=0.9,  edge.curved=T,
> edge.label=t$count, edge.label.color="darkblue",
> edge.label.font=12,vertex.shape="circle", vertex.label.dist=0,
> edge.color="darkgreen", vertex.label.cex=1, vertex.label.font=3, main="Web
> servers Diagram"))
>
> I still get the same size of image. Depending of the number of nodes (number
> of rows), I like to change the size of the image. Is there option to chnage
> the size of the image in igraph?
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

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