polar: Polar coordinates in ggplot

Description Usage Arguments See Also Examples

View source: R/polar.R

Description

polar() set polar coordinates and appropriate scales and scale_x_circular() only sets the scale, in a ggplot

Usage

1
2
3
polar(template = "geographics", ...)

scale_x_circular(template = "geographics", ...)

Arguments

template

"geographics" for bearings, "none" or "trigonometrics" for trigonometric angles; can be abbreviated

...

passed to scale_x_continuous

See Also

circular and scale_x_continuous

Examples

1
2
3
4
5
6
7
library("ggplot2")
d <- data.frame(x=runif(10, 0, 360), y=runif(10))
ggplot(d) + geom_point(aes(x=x, y=y)) 
ggplot(d) + geom_point(aes(x=x, y=y)) + polar() 

d <- data.frame(x=runif(10, 0, 2*pi), y=runif(10))
ggplot(d) + geom_point(aes(x=x, y=y)) + polar(template="none")

jiho/discr documentation built on May 19, 2019, 9:30 a.m.