Description Usage Arguments Examples
This function generates data that can be used to draw circles in ggplot.
1 | circle_fun(center = c(0, 0), radius = 2, npoints = 100)
|
center |
Numeric vector for the x and y position of the center of the circle. Default is c(0, 0). |
radius |
Radius of the circle. Default is 2. |
npoints |
The number of data points to generate. Default is 100. |
1 2 3 4 5 6 | ## Not run:
circle_data <- circle_fun(c(1,-1), 2.3, npoints = 100)
library("ggplot2")
ggplot(circle_data, aes(x,y)) + geom_path()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.