drawCircle {draw}R Documentation

Draw a Circle on the Page

Description

Draws a circle on the page given positioning, dimensions and styling.

Figure: drawCircle Example

Usage

drawCircle(x, y, radius = .pkgenv$circleRadius,
  fillColor = .pkgenv$circleFillColor, opacity = .pkgenv$circleOpacity,
  lineColor = .pkgenv$circleLineColor, lineWidth = .pkgenv$circleLineWidth,
  lineType = .pkgenv$circleLineType, units = .pkgenv$units, ...)

Arguments

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

Value

A grid.circle grob object.

See Also

drawSettings

Examples

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")


[Package draw version 1.0.0 Index]