R/fraction_pie.R

Defines functions fraction_pie

fraction_pie <- function(frac, row) {
	try(pie(x=as.numeric(frac[row,c(2:ncol(frac))]), labels=as.numeric(frac[row,c("bare", "brown", "green", "other")[1:(ncol(frac)-1)]]), main=row, col=c("brown", "orange", "darkgreen", "gray")))
	
	try(legend("topleft", legend=c("Bare ground", "Non-photosynthetic vegetation", "Photosynthetic vegetation", "NA"), pch=20, col=c("brown", "orange", "darkgreen", "gray"), bty="n", cex=0.8, pt.cex=1))
}

Try the ausplotsR package in your browser

Any scripts or data that you put into this service are public.

ausplotsR documentation built on Nov. 17, 2023, 9:06 a.m.