Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

r alluvial chart with NA

data(majors)
majors$curriculum <- as.factor(majors$curriculum)
ggplot(majors,
       aes(x = semester, stratum = curriculum, alluvium = student,
           fill = curriculum, label = curriculum)) +
  scale_fill_brewer(type = "qual", palette = "Set2") +
  geom_flow(stat = "alluvium", lode.guidance = "frontback",
            color = "darkgray") +
  geom_stratum() +
  theme(legend.position = "bottom") +
  ggtitle("student curricula across several semesters")
Source by cran.r-project.org #
 
PREVIOUS NEXT
Tagged: #alluvial #chart #NA
ADD COMMENT
Topic
Name
5+9 =