powered by
Add grids to ggplot.
grids(axis = c("xy", "x", "y"), color = "grey92", size = NULL, linetype = NULL)
axis for which grid should be added. Allowed values include c("xy", "x", "y").
c("xy", "x", "y")
grid line color.
numeric value specifying grid line size.
line type. An integer (0:8), a name (blank, solid, dashed, dotted, dotdash, longdash, twodash). Sess show_line_types.
show_line_types
# NOT RUN { # Load data data("ToothGrowth") # Basic plot p <- ggboxplot(ToothGrowth, x = "dose", y = "len") p # Add border p + grids(linetype = "dashed") # }
Run the code above in your browser using DataLab