ggcanvas: Create a blank canvas

View source: R/ggcanvas.R

ggcanvasR Documentation

Create a blank canvas

Description

Create a blank canvas centered at 0, 0 to use stamps on

Usage

ggcanvas(x = 0, y = 0)

Arguments

x

center of canvas for x axis

y

center of canvas for y axis

Examples

library(ggplot2)
ggcanvas() +
  stamp_point(color = "plum4") +
  stamp_point(x = 1, y = 1,
              color = "lightsteelblue3",
              size = 35) +
  stamp_arrow(color = "plum4",
              headlength = .06,
              headtype = "closed") +
  stamp_label(1.5, 2.5, label = "      \n\n\n\n\n",
              size = 15,
              fill = "lemonchiffon", ) +
  stamp_circle(2.5, 1.25,
               fill = "plum4") +
  stamp_point(x = c(2,2:4), y = 1:4,
              color = "paleturquoise",
              size = 15) +
  stamp_arrow(y = 2, yend = 1:4,
              xend = c(2,2:4),
              color = "cadetblue4") +
  stamp_label(1, 3.5, label = "Stamps!",
              fill = "paleturquoise3") +
  stamp_label(3.2, 1.75, label = "Umm...  \n         ",
              size = 18,
              fill = "thistle") +
  stamp_label(3.2, 1.75, label = "Umm...  \n Stamps!",
              size = 18,
              fill = "thistle") +
  theme_void() +
  stamp_curve(x = .25 + log(1:12),
              xend = 1.5 + sqrt(1:12),
              y = 0 + 1:12/20,
              color = "palegreen3",
              yend = 1:12/6,
              curvature = -.1,
              alpha = 12:1/12)

EvaMaeRey/ggstamp documentation built on June 30, 2022, 11 p.m.