| plot.r4vn_diag | R Documentation |
Draw ROC curves and/or sensitivity-specificity curves over empirical
thresholds from an object returned by tabdiag().
## S3 method for class 'r4vn_diag'
plot(
x,
what = c("roc", "cutoff", "both"),
color = NULL,
lty = 1,
line_width = 2,
legend = TRUE,
legend_position = "bottomright",
auc = TRUE,
diagonal = TRUE,
diagonal_lty = 2,
grid = FALSE,
xlim = c(0, 1),
ylim = c(0, 1),
xlab = "1 - Specificity",
ylab = "Sensitivity",
main = NULL,
cutoff_mark = TRUE,
cutoff_legend = TRUE,
cutoff_xlab = "Threshold",
cutoff_ylab = "Probability",
cutoff_main = NULL,
file = NULL,
width = 7,
height = 7,
res = 300,
bg = "white",
font_family = NULL,
cex_axis = 1,
cex_lab = 1,
cex_main = 1,
bty = "l",
...
)
x |
An object returned by |
what |
|
color |
Optional vector of line colors. Defaults to a distinct base-R qualitative palette. |
lty |
ROC line type(s). |
line_width |
ROC/cutoff line width(s). |
legend |
Logical; show the ROC legend. |
legend_position |
Base-graphics legend position, default
|
auc |
Logical; append AUC to ROC legend labels. |
diagonal |
Logical; draw the no-discrimination diagonal. |
diagonal_lty |
Line type for the no-discrimination diagonal. |
grid |
Logical; draw a light reference grid. |
xlim, ylim |
ROC axis limits. Values are clamped to |
xlab, ylab |
ROC axis labels. |
main |
Optional ROC title. |
cutoff_mark |
Logical; mark selected cutoffs with vertical reference lines on cutoff plots. |
cutoff_legend |
Logical; show sensitivity/specificity legend on cutoff plots. |
cutoff_xlab, cutoff_ylab |
Cutoff-plot axis labels. |
cutoff_main |
Optional cutoff-plot title. When multiple markers are plotted, the marker label is appended automatically. |
file |
Optional graphics filename. Supported extensions are |
width, height |
Figure width and height in inches when |
res |
Raster resolution in dpi for PNG/JPEG/TIFF output. Default 300. |
bg |
Graphics-device background color. Default |
font_family |
Optional base-graphics font family, for example
|
cex_axis, cex_lab, cex_main |
Text-size controls for axes, labels, title. |
bty |
Box type passed to base graphics. |
... |
Additional arguments passed to the initial base |
Invisibly returns x.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.