I’ve got some opinions about how to write ggplot code. They are based off of the official style guide, with a few of my own additions specific to ggplot2. Starting with argument names / newlines So, if there are more than two sections in a function, these should be separated on a newline. Ideally, all functions should have their argument names listed:

good my_fun(data = "bibbity", arg2 = "bobbity", arg3 = "boo") # bad my_fun(data = "bibbity", arg2 = "bobbity", arg3 = "boo") with the exception of tidyverse and other code, that usually has …