scatplot.log2: Scatter plot of two columns of a data.frame after log2...

View source: R/scatter-plots.R

scatplot.log2R Documentation

Scatter plot of two columns of a data.frame after log2 transformation.

Description

Scatter plot of two columns of a data.frame after log2 transformation.

Usage

scatplot.log2(data, x, y, title = "", xlabs, ylabs, min, max, a = 0.65,
  xcor = 3.3, ycor = 16.999, binx = 0.2, biny = 0.2,
  methodcor = "all", usecor = "pairwise.complete.obs", dens = TRUE,
  rug = TRUE, geomsize = 2, fig = "all", scaleCol, verbose = FALSE,
  smooth = TRUE, smoothMethod = "gam",
  smoothFormula = as.formula("y ~ s(x, bs = 'cs')"), xmin, ymin, xmax,
  ymax, abline = TRUE, publi = TRUE, col = NULL, labCol,
  family = "", policeSize = 11, sizeLegend = 8, sizeCor = 3,
  dealWithSpace = FALSE, p2alpha = 1, p3alpha = 1)

Arguments

data

numeric data.frame

x

column name to be mapped to the x-axis

y

column name to be mapped to the y-axis

title

plot title

xlabs

x-axis title

ylabs

y-axis title

min

numeric, minimum of both x-axis and y-axis

max

numeric, maximum of both x-axis and y-axis

a

numeric, alpha scaling factor to apply to the data

xcor

numeric, x coordinate for the correlation annotation to be anchored on its center

ycor

numeric, y coordinate for the correlation annotation to be anchored

binx

numeric, bin to use for the marginal plot of the x-axis

biny

numeric, bin to use for the marginal plot of the y-axis

methodcor

'all' for both Spearman and Pearson or or 'spearman' or 'pearson'

usecor

an optional character string giving a method for computing the correlation in the presence of missing values. This must be (an abbreviation of) one of the strings "everything", "all.obs", "complete.obs", "na.or.complete", or "pairwise.complete.obs" (default).

dens

logical, default TRUE. Whether density countour curves should be added to the main figure

rug

logical, default TRUE. Whether a rug should be added on the main figure

geomsize

numeric, default 2. the size of the geom_point()

fig

character string to chose from a set of predefined options that allows different outputs 'all' : complete figure with annotation and marginal plots 'grob': list of the grobs use by gridExtra::arrangeGrob to create the plot 'list': list of the different plots 'p' : the main figure with the legend 'p1' : the main figure without the legend 'p2' : the marginal figure on the x-axis 'p3' : the marginal figure on the y-axis 'legend': the legend of the figure only

scaleCol

colour palette to use for the plot

verbose

logical; default FALSE

smooth

logical; default TRUE whether a smooth curve should be plotted

smoothMethod

string, method to use for the smoothing default: "gam" (from mgcv package)

smoothFormula

formula to use with the smooth method default: as.formula("y ~ s(x, bs = 'cs')")

xmin

numeric, minimum of the x-axis

ymin

numeric, minimum of the y-axis

xmax

numeric, maximum of the x-axis

ymax

numeric, maximum of the y-axis

abline

logical; default: TRUE; whether the line y=x should be added as a reference

publi

logical, default: TRUE; whether to apply the theme_bw which is better suited for publication

col

colour palette

labCol

title for the colour scale

family

police family to use for the labels and titles

policeSize

base size for the plot

sizeLegend

size of the legend

sizeCor

size of the correlation annotation; default: 3

dealWithSpace

logical; default FALSE. Whether the space in the names of the columns to be plotted should be removed.

p2alpha

alpha scale for the marginal plot on the x-axis

p3alpha

alpha scale for the marginal plot on the y-axis

Value

a plot (see parameter fig for better description)


barzine/barzinePhdR documentation built on Nov. 23, 2024, 8:54 p.m.