comparisonplot: Comparisonplot: a fancy scatterplot

Description Usage Arguments Author(s) See Also Examples

View source: R/LSD.comparisonplot.r

Description

A function to compare two vectors extensively.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
comparisonplot(
  x,
  y,
  histbreaks = 30,
  adjust = 1,
  colpal = "heat",
  simulate = FALSE,
  daltonize = FALSE,
  cvd = "p",
  alpha = NULL,
  rev = FALSE,
  main = "comparisonplot",
  cor = FALSE,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  ab = FALSE,
  add.density = FALSE,
  col.density = "darkred",
  pimp = FALSE,
  ...
)

Arguments

x

a numeric vector.

y

a numeric vector.

histbreaks

a non-negative integer specifying the number of breaks of the histograms.

adjust

scale the used bandwidth of the density estimate, if add.density = TRUE.

colpal

a character vector containing R built-in color names or a name of a LSD colorpalette as a character string (see disco() or disco).

simulate

logical: if TRUE (FALSE by default), a converted colorpalette is used to simulate dichromat vision according to http://www.daltonize.org (see daltonize).

daltonize

logical: if TRUE (FALSE by default), a converted colorpalette is used to enhance dichromat vision according to http://www.daltonize.org (see daltonize).

cvd

character string implying the type of color vision deficiency ("p" for protanope, "d" for deuteranope or "t" for tritanope).

alpha

alpha value: a two-digit integer between 01 and 99 for color opacity, i.e. appearance of partial or full transparency (usage omitted by default).

rev

logical: if TRUE (FALSE by default), a reversed colorpalette is used.

main

title(s) of the plot, standard graphics parameter.

cor

if TRUE (FALSE by default), the correlation is added to the title.

xlab

x label, standard graphics parameter.

ylab

y label, standard graphics parameter.

xlim

x limits, standard graphics parameter.

ylim

y limits, standard graphics parameter.

ab

if TRUE (FALSE by default), abline(0,1) is added to the heatscatter.

add.density

if TRUE (FALSE by default), density lines are added to the barplots.

col.density

R built-in color to specify the color of the density line.

pimp

if TRUE (FALSE by default), the plot is pimped.

...

additional parameters to be passed to points and plot.

Author(s)

Bjoern Schwalb

See Also

align, demotour, disco, colorpalette

Examples

1
2
3
4
5
6
points = 10^4
x = c(rnorm(points/2),rnorm(points/2)+4)
y = x + rnorm(points,sd=0.8)
x = sign(x)*abs(x)^1.3

comparisonplot(x,y,histbreaks=30,pch=20)

Example output



LSD documentation built on July 2, 2020, 4:14 a.m.

Related to comparisonplot in LSD...