Convert data coordinates to the canvas coordinates

xy_to_cartesian(x, y, track_index = current_track_index())

Arguments

x

X-locations of the data points.

y

Y-locations of the data points.

track_index

Index of the track.

Details

The canvas coordinates correspond to the "native" coordinates of the viewport where the graphics are to be drawn.

Note different settings of flip and reverse in spiral_initialize affect the conversion.

Value

A data frame with two columns: x and y.

Examples

# There is no example
NULL
#> NULL