Description Usage Arguments Value See Also Examples
Draws a circle on the page given positioning, dimensions and styling.
1 2 3 4 | drawCircle(x, y, radius = .pkgenv$circleRadius,
fillColor = .pkgenv$circleFillColor, opacity = .pkgenv$circleOpacity,
lineColor = .pkgenv$circleLineColor, lineWidth = .pkgenv$circleLineWidth,
lineType = .pkgenv$circleLineType, units = .pkgenv$units, ...)
|
x |
Numeric value for the x-axis position of the center. |
y |
Numeric value for the y-axis position of the center. |
radius |
Numeric value for radius of the circle. |
fillColor |
Character value for the fill color. |
opacity |
Numeric value for the transparency with values ranging from 0 (transparent) to 1 (non-transparent). |
lineColor |
Character value for the color of the lines. |
lineWidth |
Numeric value for the width of the lines. |
lineType |
Character value for the line type. One of "blank", "solid", "dashed", "dotted", "dotdash", "longdash", or "twodash" (see "lty" in par). |
units |
Character value for the unit to use when specifying measurements. |
... |
Additional arguments passed to grid.circle |
A grid.circle grob object.
drawSettings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(draw)
# Set drawing settings
drawSettings(pageWidth = 5, pageHeight = 5, units = "inches")
# Create a new drawing page
drawPage()
# Draw a small circle
drawCircle(x = 2.5, y = 2.5, radius = 0.5)
# Draw a mid sized circle
drawCircle(x = 2.5, y = 2.5, radius = 1)
# Draw a large circle
drawCircle(x = 2.5, y = 2.5, radius = 2)
# Export the drawing page to a PDF
drawExport("drawCircle.pdf")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.