sp_ggplot_facet: Facet ggplot2 object

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Facet ggplot2 object

Usage

1
2
3
4
5
6
7
sp_ggplot_facet(
  p,
  facet_variable = NULL,
  facet_ncol = NULL,
  facet_nrow = NULL,
  facet_scales = "fixed"
)

Arguments

p

A ggplot2 object

facet_variable

Wrap plots by given column (one of column names should be specified). This is used to put multiple plot in one picture.

facet_ncol

The number of columns one want when facet is used. Default NULL.

facet_nrow

The number of rows one want when facet is used. Default NULL.

facet_scales

Paramter for scales for facet. Default fixed meaning each inner graph use same scale (x,y range), free (variable x, y ranges for each sub-plot), free_x (variable x ranges for each sub-plot), free_y (variable y ranges for each sub-plot).

Value

A ggplot2 object

Examples

1
2
3
4
## Not run:
sp_ggplot_facet(p, facet_variable)

## End(Not run)

Tong-Chen/YSX documentation built on Jan. 25, 2021, 2:49 a.m.