rcapell / HYPEtools

An R package for working with HYPE hydrological model files
GNU Lesser General Public License v3.0
17 stars 5 forks source link

use igraph plotting to make result plots? #20

Closed rcapell closed 9 years ago

rcapell commented 10 years ago

the igraph package allows to plot networks, which could be handy for plotting basin-wide subcatchment results. needs testing and more concrete ideas/plot examples before implementation.

dgustafsson commented 10 years ago

is there some specialized plotting included in RHYPE?

rcapell commented 9 years ago

i checked igraph a bit and couldn't find any direct applicability. Closing this issue for now.

rcapell commented 9 years ago

here is an example on how to plot subid connections using igraph

library(igraph)
# gd is an imported GeoData file, with SUBID and MAINDOWN in cols 2 and 4
ntw <- gd[,c(2,4)]
ntw <- graph.data.frame(ntw, directed = T)
length(E(ntw))
length(V(ntw))
nrow(gd)
plot.igraph(ntw, vertex.label.cex = .5, vertex.size = 3, edge.arrow.size = .1, layout = layout.kamada.kawai)