Learn R Programming

g2r (version 0.1.0)

coord: Coordinates

Description

Configure chart coordinates axis.

Usage

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

Run this code
# NOT RUN {
g2(cars, asp(speed, dist, color = dist)) %>% 
  fig_point() %>% 
  coord_type("helix")

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

# }

Run the code above in your browser using DataLab