plotContCont: plot Cont-Cont variable

Description Usage Arguments Details

View source: R/myplots_p.R

Description

Scatter plot for continuous variables and associated statistics

Usage

1
2
3
4
5
6
7
plotContCont(x, y, main = NULL, tag = "", xlab = "", ylab = "",
  theme_bw = TRUE, alpha = 1, size = 5, sizeExpand = 6, shape = 20,
  sizeaxis = 12, sizeaxistitlerel = 1.2, sizetitlerel = 0.8, lm = FALSE,
  lmcol = "blue2", lmsize = 2, lmlty = 2, smooth = FALSE, plot = TRUE,
  ylim = NULL, xlim = NULL, labels = NULL, sizelab = 3,
  colab = "purple", vjust = 1.9, hjust = 0.5, expand = NULL,
  plot.margin.cm = c(0.2, 1.2, 0.2, 0.2))

Arguments

x

continuous vector

y

continuous vector

tag

used to add a tag to the title

xlab

xlab

ylab

ylab

theme_bw

logical if bw theme is imposed

alpha

alpha transparancy for the points

size

size passed to geom_point()

sizeExpand

size when expanded

shape

shape passed to geom_point()

sizeaxis

axis text size (tick text)

sizeaxistitlerel

relative axis title size (tick text)

sizetitlerel

relative size for main title

lm

if to add a lm fit line

smooth

if to add a smooth line

ylim

ylim

xlim

xlim

labels

a vector of IDs to be added to each data point

sizelab

size for label under each data point

expand

whether to expand the size and axis title (useful if figure is to be copied in slides with multiple panels)

plot.margin.cm

the right margin might be too small to show full axis text; this specifies margins in top, right, bottom, left

Details

for cont~cont, we need a scatter plot. An lm fit with p value and R^2. A trend fit with smoothing can be added. Spearman corr. and Pearson Corr.


nickytong/GenAnalysis documentation built on July 20, 2019, 8:57 a.m.