powered by
This function will draw the MST for a scatterplot.
draw_mst(x, y, alpha = 0.5, out.rm = TRUE)
A "gg" object that draws the plot's MST.
numeric vector
The alpha value used to build the graph object. Larger values allow points further apart to be connected.
option to return the outlier removed MST
require(dplyr) require(ggplot2) data("features") nl <- features %>% filter(feature == "nonlinear2") draw_mst(nl$x, nl$y)
Run the code above in your browser using DataLab