Hello Francesco, It’s hard to tell without seeing your data *before* you saved things to GraphML - my guess is that there are some attributes in your original graph that cannot be handled by plot() and that are not saved to GraphML either. Try to compare the attributes in your graph *before* saving and after loading the saved GraphML file and look for differences.
-- T. ------------------------------------------------------ From: Francesco [email protected] Reply: Help for igraph users [email protected] Date: 7 March 2014 at 07:33:30 To: [email protected] [email protected] Subject: [igraph] (R) Error plotting a graph over two layers > Hello everyone > I get the following error > > Error in mapply(loop, xx0, yy0, color = ec, angle = -la, label = loop.labels, > : > zero-length inputs cannot be mixed with those of non-zero length > In addition: Warning message: > In max(vertex.size) : no non-missing arguments to max; returning -Inf > > when plotting a graph over two layers with > > par(mar=c(0,0,0,0)) > layout <- layout.circle(igraph_thread_parentCategories) > plot(igraph_thread_parentCategories, > layout=layout, > vertex.label=NA, > vertex.frame.color=NA, > edge.width=(E(igraph_thread_parentCategories)$weight)/300000, > vertex.size=log(V(igraph_thread_parentCategories)$category_size)*2) > plot(igraph_thread_parentCategories, > add=TRUE, > layout=layout, > vertex.label.color="black", > edge.label.color="black", > vertex.label.family="Palatino", > edge.label.family="Palatino", > edge.label.cex=0.6, > edge.loop.angle=0.1, > edge.label=sub("[ ]+", "", format(E(igraph_thread_parentCategories)$weight, > big.mark=",", scientific=FALSE)), > edge.width=0.001, > vertex.label.cex=log(V(igraph_thread_parentCategories)$category_size)/8, > vertex.shape="none", > vertex.label=V(igraph_thread_parentCategories)$parentCategory) > > Nevertheless if I try to write the graph in graphml and then import it again > in R I don’t > get the error anymore and I plot without problems… > > I attach the graph in graphml below: > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns > http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"> > > > > > > > 1 > Acqua > > > 26266 > Development > > > 3319 > Energy > > > 2106 > Environment > > > 27835 > Forum > > > 748 > No label > > > 20450 > Services > > > 2958 > Transport > > > 3260 > Water > > > 6.95214e+06 > > > 1.51071e+06 > > > 956584 > > > 1.53941e+07 > > > 73424 > > > 1.20328e+07 > > > 1.13116e+06 > > > 1.82569e+06 > > > 114710 > > > 103203 > > > 1.78563e+06 > > > 12189 > > > 1.37112e+06 > > > 121806 > > > 213611 > > > 37994 > > > 1.0159e+06 > > > 4404 > > > 795618 > > > 81201 > > > 121390 > > > 1.03954e+07 > > > 87206 > > > 1.5082e+07 > > > 1.24879e+06 > > > 2.17e+06 > > > 7681 > > > 74487 > > > 6167 > > > 8575 > > > 6.34569e+06 > > > 984899 > > > 1.69744e+06 > > > 53031 > > > 147161 > > > 159503 > > > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
