addGGArrows: Add Gradient Vector Arrows to Gradient Field Heatmap.

View source: R/addGGArrows.R

addGGArrowsR Documentation

Add Gradient Vector Arrows to Gradient Field Heatmap.

Description

Add vectors indicating the gradient field to the heatmap of the cumulated path lengths.

Usage

addGGArrows(
  g,
  centers,
  gradients,
  fac = 0.025,
  arrow_len = unit(0.075/2, "inches"),
  nColumns = 10L,
  nRows = 10L,
  ...
)

Arguments

g

[ggplot2::ggplot]
ggplot-object as created by ggplotHeatmap.

centers

[matrix]
Matrix containing the points of a grid of cells, for which the lengths of cumulated gradient paths should be computed. Each row corresponds to a single point.

gradients

[matrix]
Matrix containing the multi-objective gradients for each point of centers.

fac

[⁠[numeric]⁠]
Factor used for scaling the lengths of the gradient vectors. The default is 0.025.

arrow_len

[⁠[unit]⁠]
Length of the arrow tips (default: unit(0.075 / 2, "inches")).

nColumns

[⁠[integer]⁠]
How many columns of arrows should be drawn? The default is 10.

nRows

[⁠[integer]⁠]
How many rows of arrows should be drawn? The default is 10.

...

any
Further arguments to be passed to the geom_tile function of ggplot.

Value

ggplot
A ggplot object displaying the multi-objective gradient landscape.


kerschke/moPLOT documentation built on Aug. 23, 2023, 7:37 p.m.