Questions tagged [tkplot]

Interactive plotting of graphs

tkplot and its companion functions serve as an interactive graph drawing facility. Not all parameters of the plot can be changed interactively right now though, eg. the colors of vertices, edges, and also others have to be pre-defined.

24 questions
9
votes
1 answer

tkplot in latex via knitr and igraph

This may be a wild strange dream. I dreampt that I could put a tkplot from igraph inside a latex document via knitr. I know Yihui is know for animation stuff so I thought maybe this is possible. A google search didn't show what I was after so…
Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
4
votes
1 answer

Multiple directed edges igraph

I would like to express the edges between vertices 1 and 2 in the following graph as two separate edges with arrows in opposite directions. require(igraph) e <- c(1,2, 2,3, 3,1, 3,4 , 4,1 , 2,1) g <- graph(e, n=5, directed = TRUE) tkplot(g,…
4
votes
3 answers

R: tkplot giving error in R

I'm completely new to R. I'm working in Social network analysis and want to visualize a network plot. I installed various packages like igraph, ggplot2, tcltk etc.. I have a code as follows: network <- as.matrix(x) g1 <-…
N D Thokare
  • 1,703
  • 6
  • 35
  • 57
3
votes
1 answer

Plotting titles and legends on interactive igraph plot? (R)

I'm having trouble adding a title and legend to the inside of my graph. Is it not possible with tkplot OR plot? dff <- data.frame(a = c(0,1,2,3,4),b = c(3,4,5,6,7)) nod <- data.frame(node = c(0:7),wt = c(1:8)) pg <-…
hmnoidk
  • 545
  • 6
  • 20
3
votes
0 answers

Controlling the aesthetics of the graph plots using igraph in R

I have a data set like this: final.Df X1 X2 X3 1 event1 event2 event5.n1 2 event1 event2 event5.n1 3 event1 event2 event6.n1 4 event1 event3 event6.n2 5 event1 event3 event7.n2 6 event1 event3 event7.n2 7 event1 event4…
Javier
  • 1,530
  • 4
  • 21
  • 48
3
votes
2 answers

Change background color of tkplot (igraph,R)

I currently have a network plotted with tkplot(). Originally, I was saving these plots as pngs, but they were too compressed and I liked how a screen shot of the tkplot looked. Is there anyway to make the background of the plot white? Instead of the…
Judy
  • 133
  • 4
  • 10
2
votes
1 answer

Feed coordinates to tkplot() or use tkplot's arrows in plot.igraph()

Is there a way I can feed a matrix of coordinates to the tkplot function in igraph? I've tried setting the layout argument to my matrix of coordinates but it just produces a blank plot. I'm able to feed coordinates to plot.igraph() and produce a…
1
vote
0 answers

tkplot on mac freezes

I am running igraph on RStudio (version 1.0.143) on a Mac (OS Version Sierra) R version 3.3.3 Another Canoe. tkplot does not show any windows and freezes when invoked.Only action possible is to force quit RStudio. Same code works fine on my…
user2345448
  • 159
  • 2
  • 11
1
vote
1 answer

Coordinates in igraph in R

I am trying to 1) get the coordinates of a network 2) use them for other networks to have always the same position of nodes. When I get the coordinates of the nodes and set the coordinates to the same network from which I got them, it changes.…
1
vote
1 answer

Display additional information on vertex of a graph

I have an oriented graph, using the following example ba <- sample_pa(n=100, power=1, m=1, directed=T) V(ba)$color<-"yellow" tkplot(ba , layout=layout.fruchterman.reingold(ba), canvas.width=1024,canvas.height=768) I would like to find the way to…
A. F.
  • 13
  • 3
1
vote
0 answers

Inconsistencies between tkplot.coords and plot() coordinates in iGraph plots

I'm making a network plot in R using iGraph. I first plot it using tkplot() so that I can manually reposition some of the nodes. Then I capture the new coordinates and then insert those in the plot function to replot the graph along with additional…
Net20
  • 105
  • 1
  • 5
1
vote
1 answer

tkplot in html with knitr

I am attempting to include a tkplot from the igraph package inside an HTML (knit from Rmd) document via the knitr package. I asked a very similar question about latex (which should be more difficult) here. Yihui answered but I can't transfer that…
Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
1
vote
1 answer

Change edge thickness with tkplot (Igraph, R)

I was wondering if there is a way to change the edge thickness when using tkplot() I know you can do it by right clicking the edge and changing it manually, but I would like to be able to call up an attribute to use for the edge. Similar to when…
Judy
  • 133
  • 4
  • 10
0
votes
0 answers

Error message with using tkplot in R (Louvain Method for Community Detection)

I set up a correlation matrix in Excel. I then read it into R and do some adjustments to plot the Community Detection in the end. This works just fine. To better adjust the plot, I use the function tkplot(). I get the error message: Error in…
0
votes
0 answers

Right clicking on tkplot has no effect in R studio on Mac?

I'm using tkplot to produce an interactive graph. In the tkplot documentation it says that the user can right click on an edge and it will display the edge weight. However, right clicking (on a Mac) on the graph only selects the edge and has no…
Electrino
  • 2,636
  • 3
  • 18
  • 40
1
2