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
0
votes
0 answers

Why cant I get fluxes divided in ggalluvial plot?

I am new using the ggalluvial package. Currently I am working with a dataset of pixels forming different types of land cover. What I want to represent is the migration of pixels from one cover type to another along the years (four periods:…
0
votes
0 answers

ggalluvial Warning messages: 1: Computation failed in `stat_stratum()` Caused by error in `default_missing()`

I am trying to reproduce the solution given in this post, which includes a nice reproducible example Formating dataframe for a ggalluvial plot between 2 categorical variables? However, I cant get this plot, I miss the text labels and I get different…
i.b
  • 167
  • 11
0
votes
1 answer

Changing size of alluvial plot boxes to include larger text in ggplot R?

I made an alluvial plot but I noticed that my labels are difficult to read in darker colour boxes. Ultimately, I want to have larger sized font, which means I also want taller size boxes. You will notice that Landuse Management and controlled + no…
Kristen Cyr
  • 629
  • 5
  • 16
0
votes
1 answer

Changing width of border lines in alluvial plot, ggplot R?

I have made an alluvial plot with ggplot, but I'm finding it's difficult to distinguish between the boxes. I do not want to change how it's coloured, but I am hoping to increase the line width around each box so they are more distinguished. Here is…
Kristen Cyr
  • 629
  • 5
  • 16
0
votes
2 answers

Changing alpha/transparency of alluvial plot in ggplot R?

I have made an alluvial plot, but the colours are too transparent. I tried playing around with alpha = in my code but nothing happens. This is the code I'm using. I kept the alpha = in my code where I have tried it to you can see, but I have tried…
Kristen Cyr
  • 629
  • 5
  • 16
0
votes
0 answers

How to use geom_flow when categories of stratum variable are not disjunct?

I have a follow-up question on this one geom_flow since the question within the link did not cover the real problem. In my dataset there are cases where individuals within the first time period fit into more than one…
Philipp Schulz
  • 131
  • 1
  • 8
0
votes
1 answer

How to transform dataframe with duplicate rows into to_lodes_format?

I have a follow-up question to this one geom_flow question When i duplicate the rows ggalluvial is not able to generate the flow charts mentioned in the discussion: set.seed(42) individual <- as.character(rep(1:20,each=5)) timeperiod <-…
Philipp Schulz
  • 131
  • 1
  • 8
0
votes
1 answer

showing label with ggalluvium

I tried adding label to a ggalluvial plot. I only have axis 1 and 2 and when I try to show label, it shows twice. Here's my code : ggplot(bdd_1, aes(axis1 = Mef_R21, axis2 = Mef_R22, y=freq, label =…
Chloé
  • 79
  • 6
0
votes
3 answers

Change labels length in a plot

I try to run this option of a plot: library(ggalluvial) library(ggplot2) library(dplyr) df <- data.frame(status = c("open", "close", "close", "open/close", "close"), stock = c("google", "amazon", "amazon", "yahoo", "amazon"), …
Erik Brole
  • 315
  • 9
0
votes
0 answers

Color ggalluvial stratum based on a separate condition

These are my data: molec_freq<-structure(list(Primary = c("Basal-Like", "Basal-Like", "Basal-Like", "Basal-Like", "HER2-Enriched", "HER2-Enriched", "HER2-Enriched", "HER2-Enriched", "HER2-Enriched", "Luminal A", "Luminal A", "Luminal A", "Luminal…
mfeldbauer
  • 132
  • 1
  • 9
0
votes
1 answer

Aesthetics must be either length 1 or the same as the data: fill, y and axis1

Aesthetics must be either length 1 or the same as the data (5): fill, y and axis1 Any suggestion would be appreiated. Thank you! Here's the background: dim(fly) Rows: 21,000 Columns: 4 head(fly,5) Date. Airport. Count …
0
votes
0 answers

Is there a way to make an alluvial plot when one network is not mutually exclusive?

I have a dataframe similar to the following with 731 observations. Please assume that the 'Has cat X' or 'No cat X' is a string, formatted correctly. ID CATEGORY 1 CATEGORY 2 CATEGORY 3 CATEGORY 4 CATEGORY 5 CLASS 1 Has…
kp_phd
  • 1
0
votes
0 answers

Alluvial plot - reorder lodes

I have created an alluvial plot but, for visibility purposes I would like to move one lode in one of the axes: more specifically I would like the "NA" of the "Type of surgery" to be at the top so the last 4 axes are aligned. This is the code I used…
0
votes
0 answers

Transforming data with NAs in ggaluvial format and visualizing as a alluvial plot in R

I tried multiple options with Python, but did not resolve it. Found ggaluvial package and need some help. This is my fake data in such format. I calculated the frequency of each unique combination, which goes across five different roles. My problem…
Anakin Skywalker
  • 2,400
  • 5
  • 35
  • 63
0
votes
0 answers

possible to have separate factor levels for each axis in one graph?

I'm trying to plot a Sankey diagram of financial flows between a source country and counterpart country. ggplot(dat_ggforce, aes(x=x, id=id, split = y, value=yvalue)) + geom_parallel_sets(aes(fill = cpcountryname), alpha = alpha, axis.width = 0.2, …