Questions tagged [ggalluvial]

Use this tag for questions related to the ggalluvial package. The ggalluvial package extends the functionality of ggplot2 to make it easy to create alluvial charts in the R programming language.

The package extends the functionality of to make it easy to create alluvial charts in the programming language.

An overview and introduction to the package can be found on the package website

72 questions
1
vote
1 answer

ggalluvial assign different color for each node

I was following this post, but I do not get how can I manage it with my data. My plot looks like: And I would like that the "strings" were the same color as the 2nd column, i.e. for ESR1 I would like the orange string, and for PIK3CA green. Any…
WindSur
  • 141
  • 7
1
vote
1 answer

Alluvial plot editing scales and colors

I am trying to figure out how can I change the scales of the columns box, making them bigger so I can see clearly the names. Is also possible to paint the PIK3CA and ESR1 boxes in dark green and light orange, respectively? Thank you so much! Any…
WindSur
  • 141
  • 7
1
vote
1 answer

How to align and label the stratum in ggalluvial using ggrepel (or otherwise)

I have some alluvial plots that I have generated using ggalluvial in R. The code example below produces something close to what I want to achieve. For example, library("ggalluvial") par(mar = c(1,1,1,1)*12, cex = 0.6, xpd=NA) # generate some…
lmsimp
  • 882
  • 7
  • 22
1
vote
0 answers

Creating an alluvial plot in R to demonstrate web traffic flow

I have a dataset that reads like a log file showing each user interaction with a website. I'm trying to visualize this data to show the most common sequences/pathways through the site (no, I do not have access to Google Analytics - just a data…
Rob E.
  • 194
  • 3
  • 17
1
vote
1 answer

ggalluvial geom_text repeating

I would like to use geom_text within the ggalluvial plots I am creating. The code provided below works as expected unless there is a 50/50 even split between performance levels. Is there an argument within geom_text() to prevent the text from…
Susan Switzer
  • 1,531
  • 8
  • 34
1
vote
1 answer

Small values in alluvial plot where decreasing fontsize does not seem to be the solution

I have a question where I am having some trouble with small counts in the category "Worse". Decreasing fontsize even more will decrease the readability (changing the vertical height is also not the solution for me). Does somebody have an ingenious…
1
vote
1 answer

Additional colour transparency categories in ggalluvial

I'm trying to reproduce a mobility flow diagram and don't really know how to add additional colour transparency to the fill argument based on axis2 categories. Or whether that's even the way to go about solving this problem! Any suggestions would be…
1
vote
0 answers

problams reordering ggalluvial

Data library(tidyverse) library(ggalluvial) test <- structure(list(A = c("CORBMI", "PLRV00", "PSTVD0", "MONIFC", "LEPGWA", "CLRV00", "CHTSFR", "ERWICD", "MELMME", "PHYPPN"), B = c(0.42784719084056, 0.285120867173756, 0.261137015606322,…
Dr. Flow
  • 456
  • 5
  • 19
1
vote
1 answer

Showing flows for ggalluvium

Seeking some advice around the use of ggalluvium to demonstrate the distribution of preferences in Australia. Context, in Australia we have preferential voting. Say I live in an area with 4 candidates contesting. The ballot is completed by numbering…
1
vote
1 answer

R: How can I order a character column by another column (factor or character label) in ggplots

I'm trying to plot Alluvial Plots using ggplot. So far it went well until I want to try to clean the plot up. As you can see on the plot, from left to right, the first stratum/column is the ID column then it follows by a column of labels: disease…
ML33M
  • 341
  • 2
  • 19
0
votes
1 answer

How to make a sankey graph using ggalluvial in R?

I am trying to make a Sankey graph using the ggalluvial package in R. I have the following data: ID Cluster3(values ranging from 1 to 3) Cluster 6 (values ranging from 1 to 6). x and y coordinates (as this is a spatial dataset) I merely want to plot…
Tammy
  • 3
  • 2
0
votes
0 answers

Simplified alluvial/sankey plot in R with same categories on both sides

I would like to build a simplified alluvial/sankey plot in R that shows the same categories on both sides and only visualizes their change in size. Probably best illustrated by this sketch. How can I achieve this? I tried the ggalluvial and the…
Felix D.
  • 1
  • 1
0
votes
1 answer

ggalluvial: Control order of boxes/strata and line width

It's my first time using the ggalluvial package and I have problems to adapt the design for my purposes. Consider this example data I came up with: data <- data.frame(person = c(rep("x",5), rep("y",2), rep("z",4), rep("w",2), rep("v",7)), #…
Adn
  • 29
  • 4
0
votes
0 answers

I want my stratum the same size in my alluvial graph

I'm making an alluvial graph in R with two stratum. Each stratum has the same categories but when I graph, it has different size for every category because the number of observations is different. This is how it looks: and this is the…
0
votes
0 answers

How to correct strata boxes position in ggalluvial

I would like to align the strata boxes to the borders of the graph in ggalluvial plots, and cannot find the way to customize my plot accordingly. I could not find the way to adjust their position using hjust, it only moves the texts. Here is my code…
caroma
  • 1
  • 1