# Small function to display plots only if it's interactive
p_ <- GGally::print_if_interactive
data(tips)
p_(ggally_cor_v1_5(tips, mapping = ggplot2::aes(total_bill, tip)))
# display with no grid
p_(ggally_cor_v1_5(
tips,
mapping = ggplot2::aes(total_bill, tip),
displayGrid = FALSE
))
# change text attributes
p_(ggally_cor_v1_5(
tips,
mapping = ggplot2::aes(x = total_bill, y = tip),
size = 15,
colour = I("red")
))
# split by a variable
p_(ggally_cor_v1_5(
tips,
mapping = ggplot2::aes(total_bill, tip, color = sex),
size = 5
))
Run the code above in your browser using DataLab