# Small function to display plots only if it's interactive
p_ <- GGally::print_if_interactive
# Cleaner axis labels with v1_ggmatrix_theme
p_(ggpairs(iris, 1:2) + v1_ggmatrix_theme())
# Move the column names to the left and bottom
p_(ggpairs(iris, 1:2, switch = "both") + v1_ggmatrix_theme())
# Manually specifying axis labels properties
p_(
ggpairs(iris, 1:2) +
theme(
strip.background = element_rect(fill = "white"),
strip.placement = "outside"
)
)
# This way you have even more control over how the final plot looks.
# For example, if you want to set the background color to yellow:
p_(
ggpairs(iris, 1:2) +
theme(
strip.background = element_rect(fill = "yellow"),
strip.placement = "outside"
)
)
Run the code above in your browser using DataLab