plotflow (version 0.2.1)

qgrid: Quickly Set ggplot2 panel.grid

Description

Set ggplot2's panel.grid quickly.

Usage

qgrid(xmaj = "grey94", xmin = "grey94", ymaj = "grey94",
  ymin = "grey94", x, y)

Arguments

xmaj

A colour choice for panel.grid.major.x. Use NULL to remove.

xmin

A colour choice for panel.minor.x. Use NULL to remove.

ymaj

A colour choice for panel.grid.major.y. Use NULL to remove.

ymin

A colour choice for panel.minor.y. Use NULL to remove.

x

A colour choice. Sets both panel.grid.major.x and panel.minor.x. Overrides xmin and xmax. Use NULL to remove.

y

A colour choice. Sets both panel.grid.major.y and panel.minor.y. Overrides ymin and ymax. Use NULL to remove.

See Also

theme

Examples

Run this code
# NOT RUN {
ggplot(reorder_by(cyl, ~-cyl , mtcars, length), aes(x=as.factor(cyl))) +
    geom_bar()  +
    theme_apa() +
    y0(cushion(as.factor(mtcars$cyl))) +
    xlab("Cylinders") +
    ylab("Total") + qgrid()

ggplot(reorder_by(cyl, ~-cyl , mtcars, length), aes(x=as.factor(cyl))) +
    geom_bar()  +
    theme_apa() +
    y0(cushion(as.factor(mtcars$cyl))) +
    xlab("Cylinders") +
    ylab("Total") + qgrid(x=NULL)

ggplot(reorder_by(cyl, ~-cyl , mtcars, length), aes(x=as.factor(cyl))) +
    geom_bar()  +
    theme_apa() +
    y0(cushion(as.factor(mtcars$cyl))) +
    xlab("Cylinders") +
    ylab("Total") + qgrid(x=NULL, y="red")
# }

Run the code above in your browser using DataLab