Skip to contents

Creates a simple histogram or density plot of surprise values.

Usage

# S3 method for class 'bs_surprise'
plot(
  x,
  y = NULL,
  which = c("surprise", "signed_surprise"),
  type = c("histogram", "density"),
  main = NULL,
  xlab = NULL,
  col = "#4575b4",
  border = "white",
  ...
)

Arguments

x

A bs_surprise object

y

Unused

which

Which to plot: "surprise" or "signed_surprise"

type

Plot type: "histogram" or "density"

main

Plot title

xlab

X-axis label

col

Fill color

border

Border color

...

Additional arguments passed to hist() or density()

Value

Invisibly returns the input object