Description Usage Arguments Examples
The frontier geom is used to overlay the efficient frontier on a scatterplot.
| 1 2 3 4 5 6 7 | geom_frontier(mapping = NULL, data = NULL, position = "identity",
  direction = "vh", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE,
  ...)
stat_frontier(mapping = NULL, data = NULL, geom = "step",
  position = "identity", direction = "vh", na.rm = FALSE,
  show.legend = NA, inherit.aes = TRUE, quadrant = "top.right", ...)
 | 
| mapping | Set of aesthetic mappings created by  | 
| data | The data to be displayed in this layer. | 
| position | Position adjustment, either as a string, or the result of a call to a position adjustment function. | 
| direction | Direction of stairs: 'vh' for vertical then horizontal, or 'hv' for horizontal then vertical. | 
| na.rm | If  | 
| show.legend | Logical. Should this layer be included in the legends?
 | 
| inherit.aes | If  | 
| ... | Other arguments passed on to  | 
| geom | Use to override the default connection between
 | 
| quadrant | See  | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run: 
# default will find the efficient front in top right quadrant
ggplot(mtcars, aes(mpg, wt)) +
  geom_point() +
  geom_frontier()
# change the direction of the steps
ggplot(mtcars, aes(mpg, wt)) +
  geom_point() +
  geom_frontier(direction = 'hv')
# use quadrant parameter to change how you define the efficient frontier
ggplot(airquality, aes(Ozone, Temp)) +
  geom_point() +
  geom_frontier(quadrant = 'top.left')
ggplot(airquality, aes(Ozone, Temp)) +
  geom_point() +
  geom_frontier(quadrant = 'bottom.right')
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.