library(tidyverse)
library(patchwork)
make_plot <- function(cut) {
ggplot(data = filter(diamonds, cut == cut, color %in% LETTERS[4:5]),
aes(x = carat, y = price)) +
geom_point() +
facet_wrap(~ color) +
labs(title = cut)
}
make_plot("Fair") + make_plot("Good")
Created
July 27, 2018 17:34
-
-
Save andrewheiss/71a0f17a7ceeccf16c8450789dff2a4d to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created on 2018-07-27 by the reprex package (v0.2.0).