igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] changing vertex shape according to vertex characteristics


From: Meenakshi Parameshwaran
Subject: Re: [igraph] changing vertex shape according to vertex characteristics
Date: Wed, 3 Apr 2013 21:48:29 +0100

Dear Tamas,

Thanks for your advice here. I had NA values in my ethmin4 vector as well, but this did not seem to affect the colouring of the vertices. But I guess it affects the shapes. So I will try this and see.

Many thanks,
Meena


On 3 April 2013 21:43, Tamás Nepusz <address@hidden> wrote:
> #set shape of vertex attribute according to gender
> V(graph1)$shape <- ifelse(female4 == 1, "circle", "square")
If you have an NA value somewhere in the female4 vector, this will introduce NA values in the shape vector as well. E.g.:

> female4 <- c(1, 0, NA)
> ifelse(female4 == 1, "circle", "square")
[1] "circle" "square" NA

So, the solution is to get rid of the NA values from your female4 vector.

--
T.
_______________________________________________
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]