ggplot2: ggplot2 Functions

Description Usage Arguments Value bcbio_geom_abline bcbio_geom_label bcbio_geom_label_average bcbio_geom_label_repel Author(s) See Also Examples

Description

Convenience functions with modified defaults for ggplot2.

Usage

1
2
3
4
5
6
7
8
9
bcbio_geom_abline(xintercept = NULL, yintercept = NULL)

bcbio_geom_label(data = NULL, mapping = NULL, ...)

bcbio_geom_label_average(data, col, fun = c("median", "median"),
  digits = 0L, ...)

bcbio_geom_label_repel(data = NULL, mapping = NULL, color = NULL,
  size = 4L, ...)

Arguments

xintercept, yintercept

scalar numeric denoting x- or y-axis cutoff. Specify one but not both.

data

data.frame.

mapping

Set of aesthetic mappings created by aes() or aes_(). If specified and inherit.aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping.

...

Other arguments passed on to layer(). These are often aesthetics, used to set an aesthetic to a fixed value, like color = "red" or size = 3. They may also be parameters to the paired geom/stat.

col

Column.

fun

Function to use for average calculation. Currently supports "mean" or "median".

digits

Number of significant digits to use. Defaults to rounded.

color

string. Text color (e.g. "orange").

size

scalar integer. Font size.

Value

ggproto.

bcbio_geom_abline

Horizontal or vertical cutoff line.

bcbio_geom_label

Modified version of ggplot2::geom_label().

bcbio_geom_label_average

Add average labels to a plot. For example, col can be nGene. Median or mean values are always calculated per sample (sampleName).

bcbio_geom_label_repel

Repulsive textual annotations. Modified bcbio version of ggrepel::geom_label_repel(). If advanced customization of the text labels is required, simply use the ggrepel version instead.

Author(s)

Michael Steinbaugh

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# x-axis line
geom <- bcbio_geom_abline(xintercept = 1L)
geom

# y-axis line
geom <- bcbio_geom_abline(yintercept = 1L)
geom
geom <- bcbio_geom_label()
geom
geom <- bcbio_geom_label_average(
    data = colData(rse_bcb),
    col = "exonicRate",
    fun = "median"
)
geom
geom <- bcbio_geom_label_repel()
geom

hbc/bcbioBase documentation built on Aug. 21, 2018, 5:50 a.m.