This function adds a text annotation layer

stamp_ellipse(
  x0 = 0,
  y0 = 0,
  a = 1,
  b = 0.5,
  rotation = 0,
  size = 1.5,
  alpha = 1,
  linetype = "solid",
  fill = "grey85",
  color = "black",
  x0y0 = NULL
)

Arguments

x0

numeric x center of shape, defaults to 0

y0

numeric y center of shape, defaults to 0

a

width defining ellipse

b

height defining ellipse

rotation

how much the shape should be rotated, defaults to -.5

size

numeric value indicating line width, defaults to 1.5

alpha

numeric between 0 and 1 indicating transparency, defaults to 1 fully opaque, zero is fully transparent

linetype

a string indicating linetype, "solid", "dashed", "dotted", defaults to "solid"

fill

a character string indicating fill color, defaults to "grey35", for other named colors check out https://evamaerey.github.io/ggplot2_grammar_guide/named_colors

color

a character string indicating color, defaults to "black", for other named colors check out https://evamaerey.github.io/ggplot2_grammar_guide/named_colors

x0y0

dataframe indicating center of shapes, where first column is vector for x values and second column is vector for y values, defaults to NULL

Value

Examples

# an ellipse library(ggplot2) ggplot(cars) + aes(speed, dist) + stamp_ellipse() + stamp_ellipse(color = "plum4", x0 = 2, y0 = 3, rotation = pi/6)
# several ggcanvas() + stamp_ellipse(color = "green") + stamp_ellipse(x0 = 1:5, y0 = 2, size = 2)