# NOT RUN {
data("mpg", package = "ggplot2")
# Legend position
apex(
data = mpg,
mapping = aes(x = manufacturer, fill = year)
) %>%
ax_legend(position = "right")
# hide legend
apex(
data = mpg,
mapping = aes(x = manufacturer, fill = year)
) %>%
ax_legend(show = FALSE)
# }
Run the code above in your browser using DataLab