library(ggpubr)
# Créer un graphique de base
p <- ggscatter(mtcars, x = "wt", y = "mpg")
p
# Augmenter le nombre de graduations
p +
scale_x_continuous(breaks = get_breaks(n = 10)) +
scale_y_continuous(breaks = get_breaks(n = 10))
# Définir les graduations par pas, à partir de 0
p + scale_x_continuous(
breaks = get_breaks(by = 1.5, from = 0),
limits = c(0, 6)
) +
scale_y_continuous(
breaks = get_breaks(by = 10, from = 0),
limits = c(0, 40)
)
Version: English
No Comments