Learn R Programming

tidydice (version 1.0.0)

plot_dice: Plot result of roll_dice()

Description

Plot result of roll_dice()

Usage

plot_dice(
  data,
  detailed = FALSE,
  fill = "white",
  fill_success = "gold",
  point_color = "black",
  line_color = "black",
  line_size = 0.8
)

Value

ggplot-Object

Arguments

data

result of roll_dice()

detailed

If TRUE, the dice is plotted with more details

fill

Fill color

fill_success

Fill color if result is a success

point_color

Color of Points

line_color

Color of Lines

line_size

Size of Lines

Examples

Run this code
library(magrittr)  
plot_dice()
roll_dice(times = 3, rounds = 3) %>% plot_dice()
roll_dice(times = 3, rounds = 3) %>% plot_dice(fill_success = "red")

Run the code above in your browser using DataLab