ArrangeMultipleImg2Plot: ArrangeMultipleImg2Plot

Description Usage Arguments Value

View source: R/plotPeakMatrix.R

Description

Prepare multiple images to be plotted with arbitrary data that must be specified as a vector using the values parameter. The values vector must be sorted according the pos matrix of the provided peak matrix object (peakMat). The images will be plotted laidout in a matrix according the parameters nrow, ncol and byrow which follows the same conventions as the R matrix() function. A different order of the images can be specified with the img_name parameter. Just provide the images names to plotted in the desierd order. Additionally each single image can be flip horizontally and vertically and/or rotated to any angle using the parameters mirror_x, mirror_y and rotations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ArrangeMultipleImg2Plot(
  peakMat,
  values,
  nrow,
  ncol,
  byrow = T,
  margin = 20,
  img_names = peakMat$names,
  rotations = rep(0, length(img_names)),
  mirror_x = rep(F, length(img_names)),
  mirror_y = rep(F, length(img_names))
)

Arguments

peakMat

an rMSIproc peak matrix.

values

a vector of pixel values following the same order as pixels appear in the peak matrix.

nrow

number of rows of the plotted matrix layout (only used if byrow == F)

ncol

number of cols of the plotted matrix layout (only used if byrow == T)

byrow

a bool specifing if images must be arranged in rows.

margin

the separation between plotted images.

img_names

a character vector with img names in the desierd plotting order.

rotations

a vector with the rotation of each images specified in degrees.

mirror_x

a bool vector specifing if each image must be flipped or not in X direction prior to rotation.

mirror_y

a bool vector specifing if each image must be flipped or not in Y direction prior to rotation.

Value

a list object conaining the arranged position matrix, the pixel values and the labels positions.


prafols/rMSIproc documentation built on Dec. 12, 2021, 7:31 p.m.