igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Need help with plotting


From: Rk Lata
Subject: Re: [igraph] Need help with plotting
Date: Mon, 7 Dec 2015 06:40:05 -0800

Hi there,

I am trying to plot self and cross reactions of bunch of proteins. I have three states: Positive=1, Negative=0 and Partial=0.5. When I plot the values in the matrix using the code below, I get the plot shown in Fig A. I am expecting a plot as in Fig B. (Please see the Figures attached). 
What should I do to make the weakly self reacting proteins (c & d) appear as a separate group and not in group with other  strongly self reacting proteins. 

abcdefghi
a100000000
b011000000
c000.5000000
d0000.500000
e000111100
f000011100
g000011100
h000000011
i000000011


m <- as.matrix(read.csv("C:/Users/balakrr1/Desktop/csv/n3.csv", header=TRUE, sep = ",", row.names = 1))
g = graph.adjacency(m,mode="undirected",weighted=TRUE)
g=simplify(g, remove.loops=TRUE)
eb=edge.betweenness.community(g,directed=FALSE,weights=E(g)$weight)
fr=layout.fruchterman.reingold(g)
plot(eb,g,layout=fr,edge.width=E(g)$weight,main="Edge Betweenness")


Thanks,

Raj

Attachment: figA.JPG
Description: JPEG image

Attachment: figB.JPG
Description: JPEG image


reply via email to

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