| Add contours {GCDkit} | R Documentation |
Superposes contour lines to a Figaro-compatible plot.
addContours(GUI = FALSE, bandwidth = "auto",...)
GUI |
logical; is the function called from GUI (or in a direct mode)? |
bandwidth |
vector of bandwidths for x and y directions provided to the function |
... |
additional parameters passed to the underlying function |
This is, in principle, a front end to the standard R function contour. It will work on both the
stand-alone Figaro-compatible plot or a plate thereof.
The bandwidth should be a positive number or 'auto', whereby the higher value corresponds to a smoother result.
The necessary calculations are done by the function kde2d.
Additional parameters passed to the underlying function contour may include
levels, a vector of numbers 0-1 which are percentages of samples falling outside of the given contour.
The logical parameter drawlabels then determines whether the individual contour lines are to be labeled, or not.
None.
Vojtěch Erban, erban@sopky.cz Vojtěch Janoušek, vojtech.janousek@geology.cz
'filled.contour' 'kde2d' 'par' 'figaro'
sampleDataset("atacazo")
# single plot
binary("SiO2","MgO")
addContours(col="darkblue",lty="dashed",bandwidth=1.5)
figRedraw()
addContours(lty="solid",bandwidth=1.5, levels=c(0.01,0.1), col=1:2)
figRedraw()
addContours(lty="solid",bandwidth=1.5, levels=c(0.01,0.1), col=1:2,drawlabels=FALSE)
windows()
figRedraw()
addContours(col="darkgreen",lty="dotted",bandwidth=5)
# multiple plot
multiple("SiO2","Al2O3,MgO,CaO,K2O")
plateCex(2)
plateCexLab(1.5)
addContours(col="darkgreen",lty="dashed")