qgrid: Quickly Set ggplot2 panel.grid

Description Usage Arguments See Also Examples

Description

Set ggplot2's panel.grid quickly.

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## 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")

## End(Not run)

trinker/plotflow documentation built on May 31, 2019, 9:42 p.m.