Skip to content

Instantly share code, notes, and snippets.

@PeteHaitch
Created May 15, 2014 06:25
Show Gist options
  • Select an option

  • Save PeteHaitch/c01f7b94e110b9384e3e to your computer and use it in GitHub Desktop.

Select an option

Save PeteHaitch/c01f7b94e110b9384e3e to your computer and use it in GitHub Desktop.
Rafael Irizarry's default `par` for R. From a discussion on the Simply Stats about the paste0 function: http://disq.us/8ier3p
library(RColorBrewer)
mypar <- function(a = 1, b = 1, brewer.n = 8, brewer.name = "Dark2",...){
par(mar=c(2.5,2.5,1.6,1.1),mgp=c(1.5,.5,0))
par(mfrow=c(a,b),...)
palette(brewer.pal(brewer.n,brewer.name))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment