Color.edge in network function

Hi,
I am running this code

network(MyResult.diablo_comp1,blocks=c(1,2),cex.node.name=0.6,color.node=c('lightblue','yellow2'),breaks=NULL,  cutoff=0.7, lwd.edge=2,show.edge.labels=F, color.edge=  color.jet(100))

The network looks great! However, the color key of the edges gives me trouble. It looks like this:
Screenshot 2022-04-05 at 08.48.51

How can I get the color of the middle of the spectrum to be assigned to 0 instead of -0.7?
The strange thing is, that I have some green lines which are, according to the color key around -0.7 but according to the circos plot all my associations are positive.
I very much appreciate your help!
Cheers,
Stef

Hello!

Ah I’ve run into this issue myself in the past. It’s a little counter-intuitive. Where it says -0.7, it actually more means -0.7 and +0.7. So 0 is still in the middle, but have just gotten rid of all the stuff with an absolute value below your cutoff.

In other words, imagine we have the full colour key which ranges from -0.8 to +0.8. Then, take the range of -0.7 to +0.7 and squish this down into a single white band. This then leaves us with the whole colour spectrum to evaluate the edges we can see.

By this logic, the green edges in your network are those with values just above +0.7, rather than just above -0.7.

We do this because if we used the entire range of -0.8 to +0.8 with cutoff=0.8 then all the shown edges would have a tiny colour range and you wouldn’t be able to see the variation.

I hope this helps clarify things a bit for you!

Let me know if you have any other questions.