On Tue, Apr 7, 2009 at 1:57 PM, Knut Krueger <r...@krueger-family.de> wrote:
> Gábor Csárdi schrieb:
>>
>> Hi Knut,
>>  What about subtracting one?
>>
>> graph(data-1, directed=TRUE)
>>
>>
>
> yes that is what i mean and did with 0 to n-1
> but the  item numbers in all other figures are from 1 to n

Hmmm, what figures in particular? On the screenshots? I can't seem to
see any of them going from 1 to n. But anyway, you can set the
'vertex.label' argument of 'plot' to whatever you want. Please read
?igraph.plotting about how to set plotting parameters.

>>> 2. is it possible to change the thickness of the lines depending of the
>>> interactions between the nodes automatically?
>>>
>>
>> It depends what you mean by 'automatically'.
>
> means: Do I have to calculate by myself that there are 4 1> 0
> 2 2 >1
> 1 2>0
> 1 1>3
> or is there any "switch" to set  the different V(g)$size and E(g)$width
> to get the following result:
>
> iigraph_data <-c(1,0, 1,0, 1,0, 1,0, 2,1, 2,0, 2,1, 1,3)
> g <- graph( igraph_data,n=max(igraph_data), directed=TRUE )
> V(g)$size <- c(40,20,10,10)
> E(g)$width <- c(4,4,4,4,2,1,1,1)
> E(g)$arrow.size <- 1
> plot.igraph(g, layout=layout.kamada.kawai, vertex.label.font=2)

Hmmm, how should 'plot' know automatically what size/width you want?
Sorry, I don't really know what you want to achieve here. If you want
to calculate the width from some properties of the graph, then simply
do that and assign it as the 'width' argument.

G.

> With kind regards Knut
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Gabor Csardi <gabor.csa...@unil.ch>     UNIL DGM

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to