We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Thank you very much for this nice package. I am trying to draw some plots but come across one issue:
library(ggalluvial) library(ggplot2) library(ggrepel) library(ggbreak) titanic_wide <- data.frame(Titanic) titanic_long <- to_lodes_form(titanic_wide, axes = 1:4, key = "variable", value = "value", id = "cohort", diffuse = Class) ggplot( data = titanic_long, aes(x = variable, stratum = value, alluvium = cohort, y = Freq) ) + geom_alluvium(aes(fill=Class)) + geom_stratum(aes(fill=Class)) + scale_y_break( c( 50, 500 ), scales = 10, space = 0.3 ) + geom_text(stat = "stratum", aes(label = after_stat(stratum)) ) + theme_minimal() + ggtitle( "passengers on the maiden voyage of the Titanic", "stratified by demographics and survival" )+ scale_fill_manual( values=c("red","orange","green","blue"), breaks=c("1st","2nd","3rd","Crew"), labels=c("1st","2nd","3rd","Crew"), na.value = NA, aesthetics = c("fill", "color") ) + geom_text_repel(stat = "alluvium", aes(x = as.integer(variable) + 0.15, color = Class, label = ifelse(variable == "Survived" & Freq >= 10, Freq, NA)), direction = "y", nudge_x = .5, point.padding = 0, hjust = "left")
Thank you very much in advance for your time and help!
Best regards, Willi
The text was updated successfully, but these errors were encountered:
see also #56.
Sorry, something went wrong.
No branches or pull requests
Hi,
Thank you very much for this nice package. I am trying to draw some plots but come across one issue:
Thank you very much in advance for your time and help!
Best regards,
Willi
The text was updated successfully, but these errors were encountered: