axis: Axes

Description Usage Arguments Functions Examples

Description

Configure the axes.

Customise the legend.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13

Arguments

g

An object of class g2r or g2Proxy as returned by g2() or g2_proxy().

...

Options to pass to the legend, pass FALSE to hide the axis. Visit the official documentation for the full list of options.

asps

Aspect (column names) to change the legend.

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
g <- g2(cars, asp(speed, dist)) %>%
  fig_point()

# hide axis
g %>% axis_x(FALSE)

# same as above
g %>% axis_asps("speed", FALSE)

# change position
g %>% axis_x(position = "top")
g <- g2(mtcars, asp(mpg, qsec, color = gear)) %>%
  fig_point()

g %>% legend_color(position = "top")
g %>% legend_color(FALSE)

devOpifex/g2r documentation built on Jan. 16, 2022, 12:36 a.m.