1

I am new in R and I am trying to plot a graph with different connections of political parties, though to account of the flow of money I am trying to make the vertices size be proportional to their finances. I have made an adjacency matrix that allowed me to draw my first network plot but trying to account for the size gives results where nodes are all over each other.

This is what I am currently using:

plot(my_second_network,
  layout = layout.grid,
  vertex.label=toupper(1:16),
  vertex.size = flow1$Tt,
  vertex.shape = "square",
  vertex.color="white",
  vertex.frame.color= "black",
  vertex.label.color = "black",
  vertex.label.family = "sans",
  vertex.label.cex=1,
  edge.width=2,
  edge.color="black")
erc
  • 10,113
  • 11
  • 57
  • 88
  • Please read [this post](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on how to make a reproducible example. Also it is unclear exactly what your problem is. Is the vertex.size not being set correctly by the other data frame or is the layout of your network a problem? It would be great if you could show us what your code is producing and what you are trying to achieve. – emilliman5 Apr 07 '17 at 14:22
  • Hello, Thank you for your answer what I am trying to do is to make the size of vertices change proportionally to the Tt variable in the flow1 dataset, nevertheless when I run the code mentioned above this doesn't work. I guess the main issue here is how to assign the size of Tt variable to the vertices in the my_second_network graph. Again Thank you – Jebrane Kensouss Apr 07 '17 at 18:44
  • 1
    How about showing some code with an example dataset(s). My first thought is that you should add the `Tt` variable to `my_second_network` as a node attribute. You still have not show/explained how/why your code does not work. – emilliman5 Apr 07 '17 at 19:30

0 Answers0