plot_tree_move {bigchess}R Documentation

Plot tree for a given tree move table

Description

Plot tree (barplot percentages) for a given tree move data frame.

Usage

plot_tree_move(tr, main = "", add.lines = T, add.labels = T)

Arguments

tr

data frame containg tree move

main

string for main title, default is ""

add.lines

boolean (default TRUE) add weighted mean lines?

add.labels

boolean (default TRUE) add labels?

Value

Barplot with white scores, draws percent and black scores.

Examples

f <- system.file("extdata", "Kasparov.gz", package = "bigchess")
con <- gzfile(f,encoding = "latin1")
df <- read.pgn(con,quiet = TRUE,stat.moves = FALSE)
tr <- tree_move(subset(df,W1=="e4"),"B1")
plot_tree_move(tr,"1. e4 ... ?")
# Plot tree move openings in aggregated data
tr <- tree_move(FirstTwoMoves,"W1")
plot_tree_move(tr,paste0("1. ... ?\n",sum(FirstTwoMoves$Freq)," total games"))

[Package bigchess version 1.9.1 Index]