# plot_plane: Plot a plane of selected values (e.g., PPV or NPV) as a... In riskyr: Rendering Risk Literacy more Transparent

## Description

`plot_plane` draws a 3D-plane of selected values (e.g., predictive values `PPV` or `NPV`) as a function of a decision's sensitivity `sens` and specificity value `spec` for a given prevalence (`prev`).

## Usage

 ```1 2 3 4``` ```plot_plane(prev = num\$prev, sens = num\$sens, mirt = NA, spec = num\$spec, fart = NA, what = "PPV", what.col = pal, show.point = TRUE, step.size = 0.05, theta = -45, phi = 0, title.lbl = txt\$scen.lbl, cex.lbl = 0.85) ```

## Arguments

 `prev` The condition's prevalence `prev` (i.e., the probability of condition being `TRUE`). `sens` The decision's sensitivity `sens` (i.e., the conditional probability of a positive decision provided that the condition is `TRUE`). `sens` is optional when its complement `mirt` is provided. `mirt` The decision's miss rate `mirt` (i.e., the conditional probability of a negative decision provided that the condition is `TRUE`). `mirt` is optional when its complement `sens` is provided. `spec` The decision's specificity value `spec` (i.e., the conditional probability of a negative decision provided that the condition is `FALSE`). `spec` is optional when its complement `fart` is provided. `fart` The decision's false alarm rate `fart` (i.e., the conditional probability of a positive decision provided that the condition is `FALSE`). `fart` is optional when its complement `spec` is provided. `what` A character code that specifies one metric to be plotted as a plane. Currently available options are `c("PPV", "NPV", "ppod", "acc")`. Default: `what = "PPV"`. `what.col` A color corresponding to the metric specified in `what`. Default: `what.col = pal`. `show.point` Boolean option for showing the current value of the selected metric for the current conditions (`prev`, `sens`, `spec`) as a point on the plane. Default: `show.point = TRUE`. `step.size` Sets the granularity of the `sens`-by-`spec` grid. Default: `step.size = .05`. `theta` Horizontal rotation angle (used by `persp`). Default: `theta = -45`. `phi` Vertical rotation angle (used by `persp`). Default: `phi = 0`. `title.lbl` The title of the current plot. Default: `title.lbl = txt\$scen.lbl`. `cex.lbl` Scaling factor for the size of text labels (e.g., on axes, legend, margin text). Default: `cex.lbl = .85`.

## Details

`plot_plane` is a generalization of `plot_PV3d` (see legacy code) that allows for additional dependent values.

`comp_popu` computes the current population; `popu` contains the current population; `comp_freq` computes current frequency information; `freq` contains current frequency information; `num` for basic numeric parameters; `txt` for current text settings; `pal` for current color settings
Other visualization functions: `plot.riskyr`, `plot_curve`, `plot_fnet`, `plot_icons`, `plot_mosaic`, `plot_tree`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```# Basics: plot_plane() # => current defaults (what = "PPV") plot_plane(what = "PPV") # => plane of PPV plot_plane(what = "NPV") # => plane of NPV plot_plane(what = "ppod") # => plane of ppod plot_plane(what = "acc") # => plane of acc # Options: plot_plane(title.lbl = "Testing smaller text labels", cex.lbl = .60) plot_plane(show.point = FALSE) # => no point shown on plane plot_plane(step.size = .333, what.col = "firebrick") # => coarser granularity + color plot_plane(step.size = .025, what.col = "chartreuse4") # => finer granularity + color plot_plane(what.col = "steelblue4", theta = -90, phi = 45) # => rotated, from above ```