| ggtern_themes | R Documentation |
Themes set the general aspect of the plot such as the colour of the background, gridlines, the size and colour of fonts.
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 = "")
base_size |
base font size |
base_family |
base font family |
tern.plot.background |
colour of background colour to plot area |
tern.panel.background |
colour of panel background of plot area |
col.T |
colour of top axis, ticks labels and major gridlines |
col.L |
colour of left axis, ticks, labels and major gridlines |
col.R |
colour of right axis, ticks, labels and major gridlines |
col.grid.minor |
the colour of the minor grid
|
theme_grayThe signature ggplot2 theme with a grey background and white gridlines, designed to put the data forward yet make comparisons easy.
theme_bwThe classic dark-on-light ggplot2 theme. May work better for presentations displayed with a projector.
theme_linedrawA theme with only black lines of various widths on white backgrounds,
reminiscent of a line drawings. Serves a purpose similar to theme_bw.
Note that this theme has some very thin lines (<< 1 pt) which some journals
may refuse.
theme_lightA theme similar to theme_linedraw but with light grey lines and axes,
to direct more attention towards the data.
theme_darkThe dark cousin of theme_light, with similar line sizes but a dark background.
Useful to make thin coloured lines pop out.
theme_darkerA darker cousing to theme_dark, with a dark panel background.
theme_minimalA minimalistic theme with no background annotations.
theme_classicA classic-looking theme, with x and y axis lines and no gridlines.
theme_rgbwA theme with white background, red, green and blue axes and gridlines
theme_rgbgA theme with grey background, red, green and blue axes and gridlines
theme_voidA completely empty theme.
theme_customTheme with custom basic colours
theme_matrixTheme with very dark background and bright green features
theme_tropicalTheme with tropical colours
theme_bluelightA blue theme with light background and dark features
theme_bluedarkA blue theme with dark background and light features
theme_bvbwA black/vermillion/blue theme with white background, for colorblind sensitive readers, see references.
theme_bvbgA black/vermillion/blue theme with grey background, for colorblind sensitive readers, see references.
Nicholas Hamilton
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/
#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)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.