Skip to content

geom_GeomAlluvium() has yet to be implemented in plotly #1614

@nguyenkhoa0209

Description

@nguyenkhoa0209

I currently used the package ggalluvial to create alluvial diagram.
And It would be nice to see geom_GeomAlluvium() supported by ggplotly().
Here is an example that I used the code pulished on https://cran.r-project.org/web/packages/ggalluvial/vignettes/ggalluvial.html

library(plotly)
library(ggalluvial)

p = ggplot(as.data.frame(Titanic),
       aes(y = Freq,
           axis1 = Survived, axis2 = Sex, axis3 = Class)) +
  geom_alluvium(aes(fill = Class),
                width = 0, knot.pos = 0, reverse = FALSE) +
  guides(fill = FALSE) +
  geom_stratum(width = 1/8, reverse = FALSE) +
  geom_text(stat = "stratum", label.strata = TRUE, reverse = FALSE) +
  scale_x_continuous(breaks = 1:3, labels = c("Survived", "Sex", "Class")) +
  coord_flip() +
  ggtitle("Titanic survival by class and sex")

ggplotly(p)

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions