A function to create a Tetris-themed plot using ggplot2’s geom_col.
- Turns_separated.csv : template used to place Tetris-themed blocks into the chart
This plot format is very limited for practical use, and is best used to count occurrences of factors in very small datasets (<100 rows).
Clone and run blocks_plot.R and use blocks_plot() to plot data.
blocks_plot(data = NULL, count_col = NULL, bgcolor = "#ffffff", blockcolor = "#394d6e")
- data : The data to use for the plot
- count_col : The name of column to plot
- bgcolor : colour of plot background
- blockcolor : colour of plot grid lines
Example:
blocks_plot(data = df, count_col = "col_5", bgcolor = "#000000", blockcolor = "grey")
- Currently has trouble outputting with ggsave