Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotcircle

adds part of a colored circle to a plot


Description

adds (part of) a colored circle to a plot; an arrow can be drawn at a specified position

Usage

plotcircle(r = 1, ...)

Arguments

r

radius of circle.

...

arguments passed to function plotellipse.

Details

plotcircle calls plotellipse, making sure that the figure drawn effectively looks like a circle. For graphs that have both axes of equal size, the circle will be equal to the ellipse with equal rx and ry. See second example

see plotellipse for details

Author(s)

Karline Soetaert <karline.soetaert@nioz.nl>

See Also

plotellipse to draw ellipses

Examples

# symmetrical axes
emptyplot(c(0, 1))
plotcircle(mid = c(0.5, 0.5), r = 0.25, from = 0, to = 3*pi/2,
           arrow = TRUE, arr.pos = 0.5, col = "red")
# symmetrical
plotellipse(mid = c(0.5, 0.5), rx = 0.2, ry = 0.2, 
           arrow = TRUE, arr.pos = 0.5, col = "blue")


#non-symmetrical axes
emptyplot(c(0, 1), c(0, 2), main = "plotcircle", asp = FALSE)
plotcircle(mid = c(0.5, 0.5), r = 0.25, from = 0, to = 3*pi/2,
           arrow = TRUE, arr.pos = 0.5, col = "red")
plotellipse(mid = c(0.5, 0.5), rx = 0.25, ry = 0.25, 
           arrow = TRUE, arr.pos = 0.5, col = "blue")

shape

Functions for Plotting Graphical Shapes, Colors

v1.4.5
GPL (>= 3)
Authors
Karline Soetaert <karline.soetaert@nioz.nl>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.