|
From: | Uri Shwed |
Subject: | [igraph] igraph doesn't recognise its shape="star"??? |
Date: | Sun, 1 Feb 2015 19:28:48 +0000 |
Dear all,
I had a good R session when my (apple) computer crashed. Returning to what I was doing, igraph generated this very odd error:
Error in igraph.check.shapes(params("vertex", "shape")) :
Bad vertex shape(s): star.
Since "star" is a good vertex shape, and the very same code worked and produced plots with stars before the crash, I figured the problem is with something in the environment that was there before and isn’t there now (after the crash). What could
that be?And why doesn’t igraph works anymore as it used to?
I paste some code below, but I don’t think its relevant as the problem is with “star”, right?
Thanks,
Uri
pmEbw<-function(y,labe=TRUE,op=1,title="",aw=0.5,xl=c(100,492),yl=c(61,260)) {
shape<-c("circle","circle","circle","square","square","square","star","star","star","vrectangle","vrectangle","sphere","sphere")
color<-c("black","white","darkgrey","black","white","lightgrey","black","white","lightgrey","black","white","black","lightgrey","black","white")
if (labe) {lab<-V(y$sg)$SDS} else {lab<-""}
Colo<-as.numeric(V(y$sg)$D)
shaper<-shape[Colo]
if (op==1) {ec="grey32"} else {ec=add.alpha("darkgrey",op)}
plot.igraph(y$sg,layout=y$lo,rescale=FALSE,xlim=c(-1,1),ylim=c(-1,1),edge.color=ec,edge.arrow.width=aw,vertex.shape=shape[Colo],vertex.frame.color=fcolor[Colo],vertex.color=color[Colo],vertex.size=8,vertex.size2=12,vertex.label.cex=0.5,main=title,vertex.label=lab)
}
> pmEbw(mind[[1]],title="1965-2000",labe=FALSE)
Show Traceback
Rerun with Debug
Error in igraph.check.shapes(params("vertex", "shape")) :
Bad vertex shape(s): star.
>
*********************************************
Uri Shwed, PhD.
Department of Sociology and Anthropology
Ben Gurion University of the Negev
Beer Sheva 84105 Israel
**********************************************
|
[Prev in Thread] | Current Thread | [Next in Thread] |