Questions tagged [ggraph]

ggraph is the "Grammar for Graph Graphics". At the time of writing, it is an actively maintained library for R that builds upon ggplot2 providing support for relational data structures such as networks, graphs and trees. It provides a concept of layouts to aid in the layout of a graph when visualising it.

Additional information, examples, documentation and the source can be obtained from GitHub - ggraph

209 questions
0
votes
1 answer

Organize graph nodes vertically according to a 'y' value in R / ggraph

I created this little package to organize "family" data with the hope of creating genealogical trees using ggraph/tidygraph. I managed to obtain a graph like this (the data can be loaded without the package - cf. code at the…
Dominique Makowski
  • 1,511
  • 1
  • 13
  • 30
0
votes
1 answer

color of arcs in ggraph based on column value, number of request values

This question is about the ggraph library in R. This is the working example set.seed(3) widths <- sample(seq(0.1,1,0.1), 10) test.df <- data.frame("from" = seq(1,10), "to" = rep(c(2,6),5), "col" =…
Anonymous
  • 183
  • 1
  • 9
0
votes
1 answer

Using ggraph's circlepack layout in R

I am trying to create a graph using ggraph's circlepack layout in R. The code I am using is below. df <- data.frame(PID = c("root", "c11111", "c22222", "c11111", "c11111"), ID = c("c11111", "c22222", "s33333", "c44444",…
0
votes
1 answer

circle packing with ggraph. Circles in lower hierarchies are too big

I have been trying to generate a simple circular packing graph with ggraph. However, I get the following result with my data that displays internal circles that are too big for the resident circle: circle packing…
0
votes
1 answer

Why doesn't scale_edge_width_identity(guide = "legend") work?

I am using ggraph to plot two networks containing nodes and edges of varying sizes and widths, respectively. I want to maintain the absolute sizes of nodes and edges using scale_size_identity() and scale_edge_width_identity(). I'd like to display…
0
votes
0 answers

GGRAPH GPL Language to create a graph with multiple variables using the same category

Good Morning more advanced users of SPSS and R! Both SPSS and R run their advanced data visualizations using GPL (Graphics Production Language). I happen to be using SPSS, but I suspect an R user may have an answer. I have five categorical variables…
0
votes
1 answer

Network Dendrogram Levels do not Add Up

I am working with a large network with thousands of nodes and edges to consider. A reprex of the network can be found in a previous question here Number of Connected Nodes in a dendrogram However, when calculating the number of nodes within the…
James Crumpler
  • 192
  • 1
  • 8
0
votes
1 answer

ggraph edges are connecting wrong?

I am working on generating a hierarchical edge plot where the edge's color/transparency/thickness varies by the column (pvalue) in my connect dataframe, however the color/transparency/thickness of the edges in the plot I generated don't always map…
Radwa Sharaf
  • 159
  • 14
0
votes
1 answer

How do I setup data for tidygraph and ggraph?

I'm wanting to run a network analysis but am completely lost at how to get my data structured correctly, since most examples already have data structured at the to and from level. An example of my data looks like: df <- data.frame(Name = c("Alice",…
user2716568
  • 1,866
  • 3
  • 23
  • 38
0
votes
0 answers

How to arrange the nodes according to class in ggraph?

everyone. I used ggraph to draw a circular layout plot. And I want to arrange node according to their class, I mean all the nodes in the same class are placed one by one in the circular layout? Any ideas is appreciated! Thanks!
0
votes
1 answer

Creating an ontology for dataframe with more than two columns

I am trying to create a tree/ontology/dendrogram (using either ggraph or igraph) from a dataset that has three columns and thus three distinct branches: df <- data.frame( parent = c("a", "a", "a", "b", "b", "c"), child1 =…
Thomas J. Brailey
  • 151
  • 1
  • 2
  • 12
0
votes
0 answers

Reactive not working with dropdown dynamically

I have two ggraph plots - graph1 and graph2 and I want graph1 to be shown when the dropdown item "1" is chosen and graph2 to be shown when the dropdown item "2" is being chosen. But, reactive is not displaying any of the plots on the chosen values.…
maxomax
  • 119
  • 5
0
votes
0 answers

about how to get fixed network graphs

In igraph, by using layout.fruchterman.reingold(), we can apply fixed nodes position. How can we apply same fixed position using ggraph ?? I would like to have fixed nodes position in several network graphs using same samples with different types…
user224050
  • 317
  • 3
  • 10
0
votes
0 answers

about how to replicate igraph using ggraph

I have a question. How can I replicate network graphs using ggraph. plot(g) is from igraph and ggraph()is from ggraph package. I got a different figure. I am using weight, but how can I replicate a graph using ggraph?? #…
user224050
  • 317
  • 3
  • 10
0
votes
0 answers

Color a single node with tidygraph and ggraph

I have a tidy_igraph data network that I plot out. I want to however color a single node in the graph a distinct color from all others as it is the central point in the graph. I did the following to make a tibble with a color column: attending <-…
MCP_infiltrator
  • 3,961
  • 10
  • 45
  • 82
1 2 3
13
14