coord: Coordinates

Description Usage Arguments Examples

View source: R/style.R

Description

Configure chart coordinates axis.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
coord_type(g2, type = c("rect", "polar", "theta", "helix"), ...)

coord_rotate(g2, angle = 90)

coord_scale(g2, sx, sy)

coord_reflect(g2, axis = "xy")

coord_transpose(g2)

coord(type = c("rect", "polar", "theta", "helix"), rotate = NULL,
  sx = NULL, sy = NULL, reflect = NULL, transpose = FALSE, ...)

Arguments

g2

An object of class g2r as returned by g2r.

type

Type of coordinate axis.

...

Any other options.

angle

Angle of axis rotation.

sx, sy

Scale of axis along x and y axis.

axis

Axis to reflect (reverse).

coord, rotate, reflect, transpose

Corresponds to arguments of other functions listed here.

Examples

1
2
3
4
5
6
g2(cars, asp(speed, dist, color = dist)) %>% 
  fig_point() %>% 
  coord_type("helix")

g2(cars, asp(speed, dist, color = dist)) %>% 
  fig_point(coord("helix")) 

JohnCoene/g2r documentation built on March 6, 2021, 8:11 p.m.