R: Pareto Front Plot

plot_front {rPref} | R Documentation

## Pareto Front Plot

### Description

Connects the points of a Pareto front (also known as Pareto frontier) and hence visualizes the dominance region of a Skyline.

### Usage

    plot_front(df, pref, ...)

### Arguments

`df` | The data frame for which the Pareto front is plotted. This may be already a maximal set w.r.t. the preference `pref`, but anyway the maximal set is recalculated via `psel(df, pref)`.
`pref` | The preference representing the Skyline goals. This must be a Pareto composition (`p1 * p2`) or intersection composition (`p1 | p2`) of two `low` or `high` preferences.
`...` | Additional graphic parameters which are passed to the `segments` function (internally used to plot the front).

### Details

`plot_front` assumes that there is an existing plot, where the value of the first preference was plotted as x-coordinate and the value of the second preference as y-coordinate.

Note that `plot_front` is only recommended if you want to use the plotting functionality from base R. If you prefer to use ggplot2, we recommend using `geom_step` for plotting the Pareto front. See `vignette("visualization", package = "rPref")` for examples.

### Examples

    # plots Pareto fronts for the hp/mpg values of mtcars
    show_front <- function(pref) {
      plot(mtcars$hp, mtcars$mpg)
      sky <- psel(mtcars, pref)
      plot_front(mtcars, pref, col = rgb(0, 0, 1))
      points(sky$hp, sky$mpg, lwd = 3)
    }

    # do this for all four combinations of Pareto compositions
    show_front(low(hp)  * low(mpg))
    show_front(low(hp)  * high(mpg))
    show_front(high(hp) * low(mpg))
    show_front(high(hp) * high(mpg))

    # compare this to the front of a intersection preference
    show_front(high(hp) | high(mpg))

[Package rPref version 1.3 Index]