Well, if you look at the source code rglplot.igraph(), you'll see that it
just calls rgl.spheres() once. It seems that rgl.spheres() creates a single
shape id for all spheres. Btw. these ids are shape ids, and not object ids,
so I guess they don't belong to objects.

So a workaround is to copy the function and modify it to call rgl.spheres()
in a loop, with one call for each vertex. If you want we can include this
in igraph, please submit a bug report at http://bugs.launchpad.net/igraph.

Gabor


On Sat, Mar 16, 2013 at 8:34 PM, Jeff Hemsley <[email protected]>wrote:

> I'm using igraph in R and plotting my network to rglplot. Links are
> being created as "quads" as expected. Oddly, ALL vertices are being
> created as a SINGLE sphere object.
>
> This is a problem because it means I can interact with links, but not
> vertices once I get it in RGL. Is this intended behavior? If so, is
> there a workaround?
>
> Here is some example code that reproduces the issue:
>
> library("igraph")
> library("rgl")
> g <- grg.game(100, 0.1, torus=FALSE)
>
> l <- layout.kamada.kawai(g, dim=3)
>
> rglplot(g, layout=l, edge.arrow.size=0, edge.arrow.width=0)
>
> # once plotted with rgl the network is represented as a 3d scene with
> objects.
> rgl.plot.id <- rgl.ids() # gets all the ids for all the objects in the
> scene
> colnames(rgl.plot.id) # note, two cols: 'id' and 'type'
> unique(rgl.plot.id$type) # what kinds of objects do we have?
> which(rgl.plot.id$type == "spheres") # hum. Only one sphere? Shouldn't
> I have vcount(g) spheres?
>
>
> Any guidance is appreciated.
>
>
>
>
> --
> Jeff Hemsley
> Doctoral Candidate
> The Information School
> University of Washington
> http://staff.washington.edu/jhemsley/
> http://somelab.net/author/jhemsley/
> [email protected]
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <[email protected]>     MTA KFKI RMKI
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to