LinePlot: Line plots

Description Usage Arguments Details Value Examples

View source: R/LinePlot.R

Description

Draws Line plots.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
LinePlot(
  X,
  createWindow = FALSE,
  main = NULL,
  rows = NULL,
  type = c("l", "p", "s"),
  num.stacked = 4,
  xlab = NULL,
  ylab = NULL,
  ang = c("0", "45", "90"),
  xaxis_type = c("numerical", "character"),
  nxaxis = 10,
  y_axis_text = TRUE,
  xaxis_size = 11
)

Arguments

X

A numerical matrix containing the rows to be drawn.

createWindow

If TRUE, will create a new window for the plot.

main

Plot title. If NULL, default title is provided.

rows

Numerical vector indicating the X matrix rows that are drawn.

type

The type of plot, either a line plot ('l'), points ('p') or segments ('s').

num.stacked

Number of stacked plots.

xlab

Label for the x-axis.

ylab

Label for the y-axis.

ang

Angle to rotate the x axis labels for a better visualisation, either 0, 45 or 90 degrees.

xaxis_type

Specify if the xaxis is numerical or character (corresponds to the colnames of X).

nxaxis

Number of thick marks on the xaxis for a character x variable.

y_axis_text

if TRUE, will display the y-axis text.

xaxis_size

Size of the x axis.

Details

Better results printping is obtained by saving the plot as an object

Value

A loading plot in the current device.

Examples

1
2
3
4
5
6
X <- rbind(sample(1:20,20), sample(21:40,20), sample(41:60,20))
colnames(X) <- as.character(1:20)

a <- LinePlot(X = X, createWindow = FALSE, main = "line plot",  rows = c(1, 2),
             type = "l", num.stacked = 4, xlab = "x-axis", ylab = "y-axis",
             ang = "0", xaxis_type = "numerical", nxaxis = 10)

ManonMartin/MBXUCL documentation built on Nov. 26, 2021, 8:45 p.m.