plot_data: Plot data

View source: R/4_plot.R

plot_dataR Documentation

Plot data

Description

Plot data

Usage

plot_data(
  data,
  geom = geom_point,
  color = NULL,
  fill = NULL,
  linetype = NULL,
  ...,
  palette = NULL,
  fixed = list(),
  theme = list()
)

Arguments

data

data.frame'

geom

geom_point, etc.

color

variable mapped to color (symbol)

fill

variable mapped to fill (symbol)

linetype

variable mapped to linetype (symbol)

...

mapped aesthetics

palette

color palette (named character vector)

fixed

fixed aesthetics (list)

theme

list with ggplot theme specifications

Value

ggplot object

Author(s)

Aditya Bhagwat, Johannes Graumann

Examples

file <- system.file('extdata/atkin.metabolon.xlsx', package = 'autonomics')
object <- read_metabolon(file)
object %<>% pca()
data <- sdt(object)
plot_data(data, x = `effect~sample_id~pca1`, y = `effect~sample_id~pca2`)
plot_data(data, x = `effect~sample_id~pca1`, y = `effect~sample_id~pca2`, color = subgroup)
plot_data(data, x = `effect~sample_id~pca1`, y = `effect~sample_id~pca2`, color = NULL)
fixed <- list(shape = 15, size = 3)
plot_data(data, x = `effect~sample_id~pca1`, y = `effect~sample_id~pca2`, fixed = fixed)

bhagwataditya/importomics documentation built on Nov. 28, 2024, 8:28 a.m.