mosaic_examp <- ggplot(data = flights) +
geom_mosaic(aes(x = product(do_you_recline, rude_to_recline), fill = do_you_recline)) +
labs(y="Do you recline?", x="Is it rude to recline?", title = "Mosaic Plot (2 variables)")
mosaic_examp
Warning messages:
1: The scale_name argument of continuous_scale() is deprecated as of ggplot2 3.5.0.
This warning is displayed once every 8 hours.
Call lifecycle::last_lifecycle_warnings() to see where this warning was generated.
2: The trans argument of continuous_scale() is deprecated as of ggplot2 3.5.0.
ℹ Please use the transform argument instead.
This warning is displayed once every 8 hours.
Call lifecycle::last_lifecycle_warnings() to see where this warning was generated.
library(remotes)
remotes::install_github('haleyjeppson/ggmosaic')
library(tidyverse) library(ggmosaic)
flights <- fly %>% filter(!is.na(do_you_recline), !is.na(rude_to_recline))
mosaic_examp <- ggplot(data = flights) + geom_mosaic(aes(x = product(do_you_recline, rude_to_recline), fill = do_you_recline)) +
labs(y="Do you recline?", x="Is it rude to recline?", title = "Mosaic Plot (2 variables)")
mosaic_examp
Warning messages: 1: The
scale_name
argument ofcontinuous_scale()
is deprecated as of ggplot2 3.5.0. This warning is displayed once every 8 hours. Calllifecycle::last_lifecycle_warnings()
to see where this warning was generated. 2: Thetrans
argument ofcontinuous_scale()
is deprecated as of ggplot2 3.5.0. ℹ Please use thetransform
argument instead. This warning is displayed once every 8 hours. Calllifecycle::last_lifecycle_warnings()
to see where this warning was generated.