igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] (R) Error plotting a graph over two layers


From: Tamás Nepusz
Subject: Re: [igraph] (R) Error plotting a graph over two layers
Date: Fri, 7 Mar 2014 12:15:22 +0100

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 address@hidden
Reply: Help for igraph users address@hidden
Date: 7 March 2014 at 07:33:30
To:address@hidden address@hidden
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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>  




reply via email to

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