theme_showgrid: Show or Hide Grid

Description Usage Details Author(s) Examples

View source: R/theme-showgrid.R

Description

A set of convenience functions to enable or disable the use of major or minor (or both) gridlines.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19

Details

These flags operate at the 'rendering' level, and, supercede the presence of theme elements, therefore,

theme_hidegrid(...) or its aliases will PREVENT rendering of grid elements, irrespective of whether those grid elements are valid (renderable). From the counter perspective,

theme_showgrid(...) or its aliases will ALLOW rendering of grid elements, subject to those grid elements being valid (renderable, ie say element_line as opposed to element_blank).

theme_hidegrid or theme_nogrid (alias) is a function which disables both MAJOR and MINOR gridlines.

theme_showgrid_major is a function which enables MAJOR gridlines.

theme_hidegrid_major or theme_nogrid_major (alias) is a function which disables MAJOR gridlines.

theme_showgrid_major is a function which enables MINOR gridlines.

theme_hidegrid_minor or theme_nogrid_minor (alias) is a function which disables MINOR gridlines.

theme_showgrid is a function which enables both MAJOR and MINOR gridlines.

Author(s)

Nicholas Hamilton

Examples

1
2
3
4
5
6
7
8
  #Load data
  data(Feldspar)
  plot <- ggtern(data=Feldspar,aes(Ab,An,Or)) + 
          geom_point()   + #Layer 
          theme_bw()       #For clarity
  plot
  plot = plot + theme_hidegrid(); plot
  plot + theme_showgrid()

leogama/ggtern documentation built on Dec. 21, 2021, 10:40 a.m.