Closed elbamos closed 9 years ago
I'm not sure I've fully understood your data (it actually sounds like two-mode data to me), but what you want to do is already possible in a weird way:
size
to 0
to hide the nodesgeom_point
with aes(size = your_weights)
See also this bit of code, which gives you the same flexibility. It's a lightweight version of the ggnet
function. The manual weights are stored in q
.
Hi @elbamos
I still don't understand exactly what your graph looks like, but if you want to size the nodes of a Twitter network by any numeric value, such as the number of followers of each node, tthe the ggnet2
function should be able to do exactly what you want:
ggnet2(net, size = your_vector_of_weights)
or
ggnet2(net, size = "a_numeric_vertex_attribute")
Have a look at the vignette, especially the part about node sizes. Hope this helps!
That was from December! I ended up writing new code for visualizing networks using ggplot2, which is an accepted PR to ggally and will be in the next release. If you take a look at some of the examples included there, you'll see what I was trying to accomplish.
On Sep 5, 2015, at 7:51 AM, François Briatte notifications@github.com wrote:
Hi @elbamos
I still don't understand exactly what your graph looks like, but if you want to size the nodes of a Twitter network by any numeric value, such as the number of followers of each node, tthe the ggnet2 function should be able to do exactly what you want:
ggnet2(net, size = your_vector_of_weights) or
ggnet2(net, size = "a_numeric_vertex_attribute") Have a look at the vignette, especially the part about node sizes. Hope this helps!
— Reply to this email directly or view it on GitHub.
Alright. I guess you are referring to the ggnetworkmap
function in the dev
branch. Looks interesting!
Look at the Dev branch of ggally
On Sep 5, 2015, at 12:08 PM, François Briatte notifications@github.com wrote:
Would you mind pointing me to the code that you've submitted?
— Reply to this email directly or view it on GitHub.
Is there a way, or would you consider adding a way, to set the weighting manually?
I'm trying to construct a network for twitter users who discuss a particular topic. I'd like to weight each node by the number of people who would see a broadcast from that node. In twitter-speak, that's the number of "followers." I could populate my graph with an edge for every follower. Then it would have 75,000 edges instead of 300, which would create a nasty subsetting problem. So instead I only keep data for edges between users who've commented on the topic, and I track each user's number of followers.
Make sense?