Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.28 KB

README.md

File metadata and controls

45 lines (30 loc) · 1.28 KB

blocks_plot

A function to create a Tetris-themed plot using ggplot2’s geom_col.

Example of Tetris plot, showing count of video games with over 5 million sales by manufacturer

Data

Use

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")

Arguments

  • 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")

See full example here

Issues

  • Currently has trouble outputting with ggsave