plot_peak_3d: Plot of the 3D data points with peaks highlighted in green

View source: R/plot_peak_3d.R

plot_peak_3dR Documentation

Plot of the 3D data points with peaks highlighted in green

Description

This function creates an interactive 3D scatter plot of data points and highlights the peaks that are within a specified tolerance distance from any data point.

Usage

plot_peak_3d(dat, peaks, x.range = NA, y.range = NA, tol = 1e-05)

Arguments

dat

A numeric matrix or data frame with at least three columns representing x, y, and z coordinates of data points.

peaks

A numeric matrix or data frame with at least two columns representing the x and y coordinates of peak candidates.

x.range

A numeric vector of length 2 specifying the x-axis range to include.

y.range

A numeric vector of length 2 specifying the y-axis range to include.

tol

A numeric value specifying the tolerance threshold: only peaks within this Euclidean distance from a data point are retained.

Examples

data(r)
k <- kdeC(r$dat, H = c(0.014, 0.014), gridsize = c(330, 330), cutNum = c(1, 1), w = r$z)
m <- findPeak(k, filter = 0, select = 100)
dat <- cbind(r$dat, r$z)
plot_peak_3d(dat, m)

WPKDE documentation built on June 8, 2025, 11:24 a.m.

Related to plot_peak_3d in WPKDE...