How to make edges appear in a graph when adjacency matrix value is beyond a particular threshold?
Line 7 is what you need:

set.seed(42)
iris_matrix &lt;- as.matrix(iris[,1:4])
image(iris_matrix)
g&lt;-cor(iris_matrix)
library(igraph)
R&lt;-graph.adjacency(g, mode=c("undirected"), weighted=TRUE, diag=FALSE, add.colnames=NULL, add.rownames=NULL)
R[R &gt; thresh] &lt;- 0 
plot(R)