Themes set the general aspect of the plot such as the colour of the background, gridlines, the size and colour of fonts.
theme_gray
theme_bw
theme_linedraw
theme_bw
.
Note that this theme has some very thin lines (<< 1 pt) which some journals
may refuse.theme_light
theme_linedraw
but with light grey lines and axes,
to direct more attention towards the data.
theme_dark
theme_light
, with similar line sizes but a dark background.
Useful to make thin coloured lines pop out.
theme_darker
theme_dark
, with a dark panel background.
theme_minimal
theme_classic
theme_rgbw
theme_rgbg
theme_void
theme_custom
theme_matrix
theme_tropical
theme_bluelight
theme_bluedark
theme_bvbw
theme_bvbg
Okabe, Masataka, and Kei Ito. "How to make figures and presentations that are friendly to color blind people." University of Tokyo (2002). http://jfly.iam.u-tokyo.ac.jp/color/
theme_ggtern(base_size = 11, base_family = "")theme_gray(base_size = 11, base_family = "")theme_bw(base_size = 12, base_family = "")theme_linedraw(base_size = 12, base_family = "")theme_light(base_size = 12, base_family = "")theme_minimal(base_size = 12, base_family = "")theme_classic(base_size = 12, base_family = "")theme_dark(base_size = 12, base_family = "")theme_void(base_size = 12, base_family = "")theme_darker(base_size = 12, base_family = "")theme_custom(base_size = 12, base_family = "", tern.plot.background = NULL, tern.panel.background = NULL, col.T = "black", col.L = "black", col.R = "black", col.grid.minor = "white")theme_rgbw(base_size = 12, base_family = "")theme_rgbg(base_size = 12, base_family = "")theme_matrix(base_size = 12, base_family = "")theme_tropical(base_size = 12, base_family = "")theme_bluedark(base_size = 12, base_family = "")theme_bluelight(base_size = 12, base_family = "")theme_bvbw(base_size = 12, base_family = "")theme_bvbg(base_size = 12, base_family = "")
theme_custom
is a convenience function to allow the user to control the basic theme colours very easily.#Create a list of the theme suffixes themesOrg = c('gray','bw','linedraw','light', 'dark','minimal','classic','void') themesNew = c('custom','darker','rgbw','rgbg','tropical', 'matrix','bluelight','bluedark','bvbw','bvbg') #Iterate over all the suffixes, creating a list of plots plotThemes = function(themes){ grobs = lapply(themes,function(x){ thmName = sprintf("theme_%s",x) thm = do.call(thmName,args=list(base_size=9)) df = data.frame(label=thmName) ggtern(df) + facet_wrap(~label) + thm }) grobs } #Arrange the Original Themes grid.arrange(grobs=plotThemes(themesOrg),top = "Collection of Themes (Original)")#Arrange the New Themes grid.arrange(grobs=plotThemes(themesNew),top = "Collection of Themes (New Themes)")