Interactively plotting the Symmetric Deviation function
Source:R/interactive_symdev_plot.R
interactivesymdevplot.Rd
Interactively plotting the Symmetric Deviation function
Usage
interactivesymdevplot(
x,
percentiles = c(0, 50, 100),
maximise = FALSE,
col = c("white", "black"),
threshold = NULL,
thrcol = "cyan",
type = "point",
lty = "solid",
psize = 0.1,
pshape = 16,
legend.pos = "topright",
xaxis.side = "bottom",
yaxis.side = "left",
axes = TRUE,
xlabel = NULL,
ylabel = NULL,
sci.notation = FALSE,
extraLegend = "VE",
plot = "plotly"
)
Arguments
- x
Either a matrix of data values, or a data frame, or a list of data frames of exactly three columns.
- percentiles
(numeric())
- Vector indicating which percentile should be plot. The default is to plot only the median attainment curve.- maximise
(logical() | logical(1))
- Whether the objectives must be maximised instead of minimised. Either a single logical value that applies to all objectives or a vector of logical values, with one value per objective.- col
A vector of colours used to plot.
- threshold
Vorob'ev threshold, e.g., as returned by
moocore::vorobT()
.- thrcol
Colour of Vorob'ev expectation
- type
(character(1))
- string giving the type of plot desired. The following values are possible,'point'
and'area'
.- lty
Line type. See
plot.default()
.- psize
Size of plotted points
- pshape
Shape of plotted point. See
plot.default()
.- legend.pos
The position of the legend, valid values are
'topright'
,'top'
,'topleft'
,'right'
,'left'
,'bottom'
,'bottomright'
,'bottomleft'
and'center'
. A value of'none'
hides the legend.- xaxis.side
On which side that xaxis is drawn. Valid values are
'below'
and'above'
.- yaxis.side
On which side that yaxis is drawn. Valid values are
'left'
and'right'
.- axes
A logical value indicating whether both axes should be drawn on the plot.
- xlabel, ylabel
Axes labels
- sci.notation
Generate scientific labels
- extraLegend
Legend label for Vorob'ev expectation.
- plot
Interactive or none interactive plot. Valid values are
'plotly'
and'ggplot'
.
Examples
options("warn"=-1)
library(interactiveeafplots)
data(CPFs, package = "interactiveeafplots")
res <- moocore::vorobT(CPFs, reference = c(2, 200))
print(res$threshold)
#> [1] 44.14062
#> [1] 44.14062
# Display Vorob'ev expectation and attainment function
interactivesymdevplot(x=CPFs, threshold=res$threshold, col =c("red","yellow"),
percentiles = c(0,20,40,60,80,100), type="area",
thrcol="cyan", plot = "plotly", extraLegend="VE",
sci.notation = TRUE)