sp_ggplot_facet: Facet ggplot2 object

View source: R/utilities.R

sp_ggplot_facetR Documentation

Facet ggplot2 object

Description

Facet ggplot2 object

Usage

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


## Not run:
sp_ggplot_facet(p, facet_variable)

## End(Not run)


Tong-Chen/ImageGP documentation built on April 14, 2025, 12:54 p.m.