cd_plot: Plotting a Cumulative Distribution

Description Usage Arguments Value Examples

View source: R/svs.r

Description

A function for plotting a cumulative distribution.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
cd_plot(
  x,
  inc = 0.01,
  col = "darkgrey",
  cex = 1,
  font = 1,
  family = "",
  srt = -45,
  pch = 20,
  pcol = "black",
  pbg = "white",
  pcex = cex,
  lcol = col,
  lwd = 1,
  lty = 1,
  xlim = NULL,
  ylim = NULL,
  xlab = NULL,
  ylab = NULL,
  main = NULL,
  sub = NULL
)

Arguments

x

A numeric vector.

inc

The (numeric) increment for constructing the sequence from 0 to ceiling(max(x)), plotted on the horizontal axis.

col

The color of the line and the text labels: see colors.

cex

The character expansion factor: a numberic value to specify the size of the text labels.

font

The font of the text labels: 1 for plain, 2 for bold, 3 for italic, and 4 for bold italic.

family

The font family of the text labels: "serif", "sans", "mono", or one of the Hershey fonts.

srt

The rotation angle (in degrees) of the text labels.

pch

The plotting character for displaying points: see points.

pcol

The color of the plotting character: see colors.

pbg

The background color of the plotting character: see colors.

pcex

The character expansion factor of the plotting character: a numeric value to specify the size of the plotting character.

lcol

The color of the line: see colors.

lwd

The line width of the line: a numeric value to specify the width of the line.

lty

The line type of the line: 0 or "blank", 1 or "solid", 2 or "dashed", 3 or "dotted", 4 or "dotdash", 5 or "longdash", 6 or "twodash".

xlim

A vector of two numeric values specifying the lower and upper limit between which to plot the horizontal axis.

ylim

A vector of two numeric values specifying the lower and upper limit between which to plot the vertical axis.

xlab

A character string for labelling of the horizontal axis.

ylab

A character string for labelling of the vertical axis.

main

A character string for the main title of the plot.

sub

A character string for the subtitle of the plot.

Value

A cumulative distribution plot.

Examples

1
2
3
4
5
6
SndT_Fra <- read.table(system.file("extdata", "SndT_Fra.txt", package = "svs"),
   header = TRUE, sep = "\t", quote = "\"", encoding = "UTF-8",
   stringsAsFactors = FALSE)
sca.SndT_Fra <- fast_sca(SndT_Fra)
dis.SndT_Fra <- dist_wrt(sca.SndT_Fra$pos1)
cd_plot(dis.SndT_Fra)

Example output



svs documentation built on Nov. 10, 2020, 1:09 a.m.