The argument “interactive” of the function “clover_plot_data” determines if a static plot (interactive=FALSE) or an interactive plot (interactive=TRUE) should be plotted. The default value is TRUE. The static plot is more appropriate for exporting the plot to pdf or other formats. The interactive plot allows the user to explore the plotted points using the hoovering tooltip, to zoom the chart (click-and-drag to zoom in, double-click to autoscale), and to pan (shift-and-drag).
First we generate data from bivariate normal distributions with different means and the same variance matrices and compute the necessary quantities:
library(mvtnorm)
n1 <- 100
n2 <- 75
set.seed(2020)
X <- rmvnorm(n1, mean=c(0,0), sigma=diag(2)) # Observations of class 1
Y <- rmvnorm(n2, mean=c(2,2), sigma=diag(2)) # Observations of class 2
res <- clover_calc(X, Y)
The interactive plot of the data is produced by default:
clover_plot_data(res)
The static plot of the data can be produced, too:
clover_plot_data(res, interactive=FALSE)