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

how can i label only connected node in r circular plot

I want to label the plot only if they have conection. My data is df <- data.frame(col1 = c(2, 26, 26, 27, 27, 28, 28, 28), col2 = c(94, 146, 175, 213, 213, 55, 247, 263)) And code is library(tidygraph) library(ggraph) df…
0
votes
2 answers

R ggraph facets

I'm having difficulty figuring out how to facet a graph properly. See for example the following. library(tidyverse) library(tidygraph) library(ggraph) myedges <- data.frame(from=rep(letters[1:5],2), …
maxbre
  • 161
  • 9
0
votes
1 answer

could not find function "try_fetch"

I'm trying to create a Network plot but it doesn't seem to work. Here is my code graph_from_data_frame(d = word_correlations, vertices = abstract_which_mention_word %>% semi_join(word_correlations, by =…
0
votes
0 answers

Overlaying a network (igraph/ggraph) with a map shapefile in R

I have a network created with igraph and then viewed with ggraph. The edges have different weights based on the data as do the nodes. I want to place the network on a map according to the nodes gps coordinates, but I can't figure out how to transfer…
Cheryl
  • 1
  • 1
0
votes
1 answer

Show columns as percentage in R ggplot

I need help with a graph I am trying to built in R. This is the data: Location Total Number of Employees Local Number Remote…
melisa
  • 95
  • 5
0
votes
0 answers

Problems with geom_edge_arc()

I created a plot in which I can display the number of flights. I am not able to make a conditional statements or something like that to choose only four colors for n =100, 150, 200, 250 within geom_edge_arc(). I just got several colors for each…
Gaaaa
  • 115
  • 9
0
votes
0 answers

In R ggraph, how to fix circular plot structure

Below code can't get the wished plot (the data structure can' show in current plot), How to fixed it and change the plot to wished plot ? Thanks! library(ggraph) library(igraph) library(tidyverse) md <- data.frame(category = c('FDM','FDM','FDM'), …
anderwyang
  • 1,801
  • 4
  • 18
0
votes
2 answers

Two columns on x-axis and different grids in R

I need some help with a graph in R. This is how my dataframe looks like Footprint Local Number Remote…
melisa
  • 95
  • 5
0
votes
0 answers

Two questions of R circlepack plot :

Two questions of R circlepack plot : the result always not real circular (it always show in ellipse, I have to adjust the plot window size in Rstudio ....) . Is the any way to hadle it ? The position of circular and sub circular will be changed…
anderwyang
  • 1,801
  • 4
  • 18
0
votes
1 answer

How to draw an arrowhead on a specific position on an edge?

I have a graph in which each edge is an ownership distribution between its nodes. E.g., of the edge between "A" and "B", "A" owns 90% and "B" owns only 10%. I would like to visualize this by placing an arc on the edge in relative position to that…
jhfodr76
  • 95
  • 1
  • 7
0
votes
1 answer

Plotting pi digits as connection bundles with ggraph

I'm looking to plot the digits of Pi as heirarchical edge bundles, as shown in this image Here, the digits of Pi are grouped by their colour, and then each digit has an edge drawn to the digit that follows it (i.e., if Pi is 3.141, then 3 would…
Conor Neilson
  • 1,026
  • 1
  • 11
  • 27
0
votes
1 answer

Hierarchical plot with bubbles in r

On this page, I found an interesting plot: Is it possible to do something similar or exactly? (Combination between treemap and ggraph library).
cdcarrion
  • 574
  • 6
  • 22
0
votes
1 answer

Find connections between values of one column in R and build network grapgh

I want to count how many common values do rows of a column have with each other. This is what my dataframe looks like: Location Manager L1 M45 L2 M45 L34 M12 L5 M45 L23 M12 L4 M3 L11 M45 I want to create a new dataframe with…
melisa
  • 95
  • 5
0
votes
1 answer

R ggraph / igraph geom_edge_link2 define custom color for factor variable

I'm trying to change the colors of the edges. Currently the graph displays as follows While the edges are colored according to the graph property "Polarität" (polarity) , i'd like to switch it up from the default ggplot red and blue color scheme.…
mlt
  • 1
  • 1
0
votes
1 answer

how to censor data point labels (annotations) if label text overlaps in the plot when using ggraph

I am attempting to plot some data using ggraph. The style is a circular partition plot. I have numerous plots/graphs. Each has a different density of dendritic branching. Nodes on the graph are labeled with geom_node_text(aes(label = labelText)). I…
jbjo
  • 111
  • 2