Configure chart coordinates axis.

coord_type(g, type = c("rect", "polar", "theta", "helix"), ...)

coord_rotate(g, angle = 90)

coord_scale(g, x, y)

coord_reflect(g, axis = "xy")

coord_transpose(g)

Arguments

g

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

type

Type of coordinate axis.

...

Any other options.

angle

Angle of axis rotation.

x, y

Scale of axis along x and y axis.

axis

Axis to reflect (reverse).

Functions

  • coord_type: Type of coordinates to use where rect corresponds to cartesian.

  • coord_rotate: Rotate the coordinates by a certain angle.

  • coord_scale: Rescale the coordinates.

  • coord_reflect: Mirror the axis along the x, y, or xy (both) axes.

  • coord_transpose: x, y axes displacement.

Examples

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