library("pRolocdata")
data(dunkley2006)
plot2D(dunkley2006, fcol = NULL)
## available methods
plot2Dmethods
plot2D(dunkley2006, fcol = NULL, method = "kpca")
plot2D(dunkley2006, fcol = NULL, method = "kpca",
methargs = list(kpar = list(sigma = 1)))
plot2D(dunkley2006, fcol = "markers")
addLegend(dunkley2006,
fcol = "markers",
where = "topright",
cex = 0.5, bty = "n", ncol = 3)
title(main = "plot2D example")
## Using transparent colours
setStockcol(paste0(getStockcol(), "80"))
plot2D(dunkley2006, fcol = "markers")
## New behavious in 1.3.6 when not enough colours
setStockcol(c("blue", "red", "green"))
getStockcol() ## only 3 colours to be recycled
getMarkers(dunkley2006)
plot2D(dunkley2006)
## reset colours
setStockcol(NULL)
plot2D(dunkley2006, method = "none") ## plotting along 2 first fractions
plot2D(dunkley2006, dims = c(3, 5), method = "none") ## plotting along fractions 3 and 5
## pre-calculate PC1 and PC2 coordinates
pca <- plot2D(dunkley2006, plot=FALSE)
head(pca)
plot2D(pca, method = "none", methargs = list(dunkley2006))
Run the code above in your browser using DataLab