time_plot | R Documentation |
Generate a plot of move times.
time_plot(
white_move_times,
black_move_times,
style = "graph",
scaling = "lichess"
)
white_move_times |
A numeric vector of move times for white, in seconds. |
black_move_times |
A numeric vector of move times for black, in seconds. |
style |
(Default = 'graph') A single-element character vector indicating the plot style. Allowed values are 'graph' for a traditional graph with axes, or 'infographic' to add a background gradient and remove the axes (similar to lichess.org). |
scaling |
(Default = 'lichess') A single-element character vector indicating how the plot should be scaled. Allowed values are 'none' to plot the data as is, 'lichess' to apply the same scaling function used by lichess.org. |
Move times (in seconds) are plotted using a scaling function borrowed from lichess.org. The logarithmic scaling function keeps short move times from disappearing into the baseline. White move times are shown as positive values, with a white fill, while black move times are shown as negative values with a dark gray fill.
A ggplot object of the plotted data.
advantage_plot()
to plot advantage data.
game_summary_plot()
to plot move time and advantage data with a
table of game stats.
white_move_times <- c(4, 10, 5, 10)
black_move_times <- c(3, 4, 7)
time_plot(white_move_times, black_move_times)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.