Learn R Programming

riskyr (version 0.1.0)

plot.riskyr: Plot information of a riskyr object.

Description

plot.riskyr is a method that allows to generate different plot types from a "riskyr" object.

Usage

# S3 method for riskyr
plot(x = NULL, plot.type = "network", ...)

Arguments

x

An object of class "riskyr", usually a result of a call to riskyr. Pre-defined scenarios are also of type "riskyr".

plot.type

The type of plot to be generated.

  1. plot.type = "fnet" or plot.type = "network": Risk information is plotted in a network diagram of frequencies and probabilities (default). See plot_fnet for further options.

  2. plot.type = "ftree" or plot.type = "ftree": Risk information is plotted in a frequency tree. See plot_tree for further options.

  3. plot.type = "icons" or plot.type = "iconarray": The underlying population is plotted as icons. See plot_icons for further options.

  4. plot.type = "mosaic" or plot.type = "mosaicplot": Risk information is plotted as a mosaicplot. See plot_mosaic for further options.

  5. plot.type = "curve" or plot.type = "curves": Draws curves of selected values (including PPV, NPV) See plot_curve for further options.

  6. plot.type = "plane" or plot.type = "planes": Draws a 3D-plane of selected values (e.g., predictive values PPV or NPV) See plot_plane for further options.

...

Additional parameters to be passed to the underlying plotting functions.

Details

plot.riskyr also uses the text settings specified in the "riskyr" object.

See Also

Other visualization functions: plot_curve, plot_fnet, plot_icons, plot_mosaic, plot_plane, plot_tree

Examples

Run this code
# NOT RUN {
# Select a scenario from list of scenarios:
s25 <- scenarios$n25  # select scenario 25 from scenarios

# Plot different types:
plot(s25)  # => default plot (fnet)
plot(s25, plot.type = "fnet")  # => network diagram (same as default)
plot(s25, plot.type = "tree", area = "vr") # => tree diagram (with vertical rectangles)
plot(s25, plot.type = "curve", what = "all")
plot(s25, plot.type = "icons")
plot(s25, plot.type = "icons", type = "mosaic")  # passing on additional parameter to create.
plot(s25, plot.type = "mosaic")
plot(s25, plot.type = "plane", what = "NPV")


# }

Run the code above in your browser using DataLab