plotting frontier in R