igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Dashed edges


From: Gábor Csárdi
Subject: Re: [igraph] Dashed edges
Date: Wed, 18 May 2011 09:25:56 -0400

g <- graph( c( 0,1, 0,3, 1,2, 1,3, 2,3, 4,5, 4,6, 5,6, 6,7, 6,8, 7,8,
3,8, 2,8, 2,5, 1,4, 1,5, 1,6, 1,7, 0,4, 0,5), directed=FALSE )
E(g)$lty <- 1
E(g, P=c(3,8, 2,8, 2,5, 1,4, 1,5, 1,6, 1,7, 0,4, 0,5))$lty <- 2
plot(g, layout=layout.circle)

G.

On Wed, May 18, 2011 at 9:20 AM, Moses Boudourides
<address@hidden> wrote:
> Thanks Gábor, but I would appreciate a little more help. My graph
> (just an example) is:
>
> g <- graph( c( 0,1, 0,3, 1,2, 1,3, 2,3, 4,5, 4,6, 5,6, 6,7, 6,8, 7,8,
> 3,8, 2,8, 2,5, 1,4, 1,5, 1,6, 1,7, 0,4, 0,5), directed=FALSE )
>
> and I would like to have dashed the edges:
>
> 3,8, 2,8, 2,5, 1,4, 1,5, 1,6, 1,7, 0,4, 0,5
>
> How would I do it?
>
> --Moses
>
>
>
> On Wed, May 18, 2011 at 2:58 PM, Gábor Csárdi <address@hidden> wrote:
>> Hi Moses,
>>
>> if you use R, see ?igraph.plotting and the 'lty' edge attribute. E.g.:
>>
>> plot(graph.ring(10), layout=layout.circle, edge.lty=rep(1:2,length=10))
>>
>> Gabor
>>
>> On Wed, May 18, 2011 at 5:26 AM, Moses Boudourides
>> <address@hidden> wrote:
>>> Hi,
>>>
>>> What is the simplest way to plot by dashed lines only certain edges of
>>> a graph (not all)?
>>>
>>> Best,
>>>
>>> --Moses
>>>
>>> _______________________________________________
>>> 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
>>
>



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



reply via email to

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