plotValuesImageG: plotValuesImageG.

Description Usage Arguments Value

Description

Plot a raster image of arbitrary pixel values. This cna be use to plot PCA results for example. This function is equivalent to the rMSIproc::plotValuesImage() but using ggplot2. If the pixel_values is a "factor" object then discrete colors are used. This is useful to plot clustering results.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
plotValuesImageG(
  peakMatrix,
  pixel_values,
  scale_label = "",
  title_label = "",
  plot_rows = 2,
  plot_cols = 2,
  plot_byrow = T,
  plot_rotations = rep(0, length(peakMatrix$names)),
  plot_mirror_X = rep(F, length(peakMatrix$names)),
  plot_mirror_Y = rep(F, length(peakMatrix$names)),
  plot_margin = 40,
  plot_labels = peakMatrix$names,
  gradient_scale_colours = rev(rainbow(n = 100, start = 0, end = 0.6)),
  gradient_scale_limits = c(min(pixel_values), max(pixel_values)),
  fixed_aspect_ratio = F,
  display_colorbar = T
)

Arguments

peakMatrix

an rMSIproc peak matrix.

pixel_values

a vector with the pixel values, factor object can be used for a discrete image.

scale_label

Text label for the plot scale bar.

title_label

Text label for the plot main title.

plot_rows

number of rows to arrange multiple images in the plotting area.

plot_cols

number of columns to arrange multiple images in the plotting area.

plot_byrow

a boolean idicating if the plotted images must be sorted by rows.

plot_rotations

a vector with the rotation in degree to apply to each image.

plot_mirror_X

a vector of booleans idicatinc if each image must be flipped horizontally.

plot_mirror_Y

a vector of booleans idicatinc if each image must be flipped vertically.

plot_margin

a numeric value that determines the separation between images.

plot_labels

text labels to be used for each image.

gradient_scale_colours

alternative color scale for the image.

gradient_scale_limits

alternative limits for the pixel values.

fixed_aspect_ratio

set this flag to true to fix the aspect ratio of the ion images.

display_colorbar

set if the colour bar must be displayed.

Value

a ggplot2 object.


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