Learn R Programming

PRECAST (version 1.6.6)

coordinate_rotate: Coordinates rotation for visualization

Description

Coordinates rotation for visualization.

Usage

coordinate_rotate(pos, theta=0)

Value

Return a rotated coordinate matrix.

Arguments

pos

a matrix, the n-by-d coordinates, where n is the number of coordinates, d is the dimension of coordinates.

theta

a real number, the angle for counter-clock-wise rotation.

Author

Wei Liu

Details

Nothing

See Also

None

Examples

Run this code
    x <- 1:100
    pos <- cbind(x, sin(pi/4*x))
    oldpar <- par(mfrow = c(1,2))
    plot(pos)
    plot(coordinate_rotate(pos, 40))
    par(oldpar)
    

Run the code above in your browser using DataLab