autoplot.plinko_board: Plot a Plinko board as a ggplot2 plot

View source: R/plot.plinko_board.R

autoplot.plinko_boardR Documentation

Plot a Plinko board as a ggplot2 plot

Description

Plots a single frame from a Plinko board animation.

Usage

## S3 method for class 'plinko_board'
autoplot(
  object,
  ...,
  frame = NULL,
  show_paths = TRUE,
  show_dist = TRUE,
  show_target_dist = TRUE
)

Arguments

object

A plinko_board() object

...

other arguments passed to specific methods

frame

Which frame to plot (an integer). If NULL (the default), plots the final frame (i.e. all the balls in their final positions).

show_paths

Should ball paths be shown?

show_dist

Should an overlay of the binomial distribution for this Plinko board be shown?

show_target_dist

For plinko_board() objects constructed from a distributional object (like dist_normal(), etc), should an overlay of the target distribution for this Plinko board be shown?


mjskay/plinko documentation built on March 9, 2024, 5:55 a.m.