name: title class: top, inverse, right background-image: url(https://images.unsplash.com/photo-1593448806592-409752fd816b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80) background-size: cover # {ggstamp} ### #### Photo Credit: Glen Carrie --- --- count: false .panel1-my_cars-user[ ```r *library(ggplot2) *library(ggstamp) *ggplot(data = cars) + * aes(speed, dist) + * theme_minimal(base_size = 15) ``` ] .panel2-my_cars-user[ ![](flipbook_files/figure-html/my_cars_user_01_output-1.png)<!-- --> ] --- count: false .panel1-my_cars-user[ ```r library(ggplot2) library(ggstamp) ggplot(data = cars) + aes(speed, dist) + theme_minimal(base_size = 15) + * geom_point() ``` ] .panel2-my_cars-user[ ![](flipbook_files/figure-html/my_cars_user_02_output-1.png)<!-- --> ] --- count: false .panel1-my_cars-user[ ```r library(ggplot2) library(ggstamp) ggplot(data = cars) + aes(speed, dist) + theme_minimal(base_size = 15) + geom_point() + * stamp_point(color = "darkolivegreen3") ``` ] .panel2-my_cars-user[ ![](flipbook_files/figure-html/my_cars_user_03_output-1.png)<!-- --> ] --- count: false .panel1-my_cars-user[ ```r library(ggplot2) library(ggstamp) ggplot(data = cars) + aes(speed, dist) + theme_minimal(base_size = 15) + geom_point() + stamp_point(color = "darkolivegreen3") + * stamp_point(color = "slateblue", * x = c(10, 15), * y = c(100, 90)) ``` ] .panel2-my_cars-user[ ![](flipbook_files/figure-html/my_cars_user_04_output-1.png)<!-- --> ] --- count: false .panel1-my_cars-user[ ```r library(ggplot2) library(ggstamp) ggplot(data = cars) + aes(speed, dist) + theme_minimal(base_size = 15) + geom_point() + stamp_point(color = "darkolivegreen3") + stamp_point(color = "slateblue", x = c(10, 15), y = c(100, 90)) + * stamp_curve(x = 6, xend = c(10, 14.75), * y = 9.5, yend = c(95, 85), * curvature = .2) ``` ] .panel2-my_cars-user[ ![](flipbook_files/figure-html/my_cars_user_05_output-1.png)<!-- --> ] --- count: false .panel1-my_cars-user[ ```r library(ggplot2) library(ggstamp) ggplot(data = cars) + aes(speed, dist) + theme_minimal(base_size = 15) + geom_point() + stamp_point(color = "darkolivegreen3") + stamp_point(color = "slateblue", x = c(10, 15), y = c(100, 90)) + stamp_curve(x = 6, xend = c(10, 14.75), y = 9.5, yend = c(95, 85), curvature = .2) + * stamp_bubble(fill = "plum2", * color = "plum4", * size = 15, * x = 5, y = 8) ``` ] .panel2-my_cars-user[ ![](flipbook_files/figure-html/my_cars_user_06_output-1.png)<!-- --> ] --- count: false .panel1-my_cars-user[ ```r library(ggplot2) library(ggstamp) ggplot(data = cars) + aes(speed, dist) + theme_minimal(base_size = 15) + geom_point() + stamp_point(color = "darkolivegreen3") + stamp_point(color = "slateblue", x = c(10, 15), y = c(100, 90)) + stamp_curve(x = 6, xend = c(10, 14.75), y = 9.5, yend = c(95, 85), curvature = .2) + stamp_bubble(fill = "plum2", color = "plum4", size = 15, x = 5, y = 8) + * stamp_label(label = "This is a stamp", * x = 20, * y = 15) ``` ] .panel2-my_cars-user[ ![](flipbook_files/figure-html/my_cars_user_07_output-1.png)<!-- --> ] --- count: false .panel1-my_cars-user[ ```r library(ggplot2) library(ggstamp) ggplot(data = cars) + aes(speed, dist) + theme_minimal(base_size = 15) + geom_point() + stamp_point(color = "darkolivegreen3") + stamp_point(color = "slateblue", x = c(10, 15), y = c(100, 90)) + stamp_curve(x = 6, xend = c(10, 14.75), y = 9.5, yend = c(95, 85), curvature = .2) + stamp_bubble(fill = "plum2", color = "plum4", size = 15, x = 5, y = 8) + stamp_label(label = "This is a stamp", x = 20, y = 15) + * stamp_text(label = "This\ntoo", * x = 18, * y = 110, * lineheight = .8) ``` ] .panel2-my_cars-user[ ![](flipbook_files/figure-html/my_cars_user_08_output-1.png)<!-- --> ] --- count: false .panel1-my_cars-user[ ```r library(ggplot2) library(ggstamp) ggplot(data = cars) + aes(speed, dist) + theme_minimal(base_size = 15) + geom_point() + stamp_point(color = "darkolivegreen3") + stamp_point(color = "slateblue", x = c(10, 15), y = c(100, 90)) + stamp_curve(x = 6, xend = c(10, 14.75), y = 9.5, yend = c(95, 85), curvature = .2) + stamp_bubble(fill = "plum2", color = "plum4", size = 15, x = 5, y = 8) + stamp_label(label = "This is a stamp", x = 20, y = 15) + stamp_text(label = "This\ntoo", x = 18, y = 110, lineheight = .8) + * stamp_segment(x = 20, xend = 18, * y = 23, yend = 100) ``` ] .panel2-my_cars-user[ ![](flipbook_files/figure-html/my_cars_user_09_output-1.png)<!-- --> ] --- count: false .panel1-my_cars-user[ ```r library(ggplot2) library(ggstamp) ggplot(data = cars) + aes(speed, dist) + theme_minimal(base_size = 15) + geom_point() + stamp_point(color = "darkolivegreen3") + stamp_point(color = "slateblue", x = c(10, 15), y = c(100, 90)) + stamp_curve(x = 6, xend = c(10, 14.75), y = 9.5, yend = c(95, 85), curvature = .2) + stamp_bubble(fill = "plum2", color = "plum4", size = 15, x = 5, y = 8) + stamp_label(label = "This is a stamp", x = 20, y = 15) + stamp_text(label = "This\ntoo", x = 18, y = 110, lineheight = .8) + stamp_segment(x = 20, xend = 18, y = 23, yend = 100) + * ggxmean::stamp_normal_dist( * height = 200, * fill = "magenta", * mean = 14, sd = 2) ``` ] .panel2-my_cars-user[ ![](flipbook_files/figure-html/my_cars_user_10_output-1.png)<!-- --> ] <style> .panel1-my_cars-user { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-my_cars-user { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-my_cars-user { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-arrows-auto[ ```r *ggcanvas() ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_01_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + * stamp_point(color = "plum4") ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_02_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + stamp_point(color = "plum4") + * stamp_point(x = 1, y = 1, * color = "lightsteelblue3", * size = 35) ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_03_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + stamp_point(color = "plum4") + stamp_point(x = 1, y = 1, color = "lightsteelblue3", size = 35) + * stamp_arrow(color = "plum4", * headlength = .06, * type = "closed") ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_04_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + stamp_point(color = "plum4") + stamp_point(x = 1, y = 1, color = "lightsteelblue3", size = 35) + stamp_arrow(color = "plum4", headlength = .06, type = "closed") + * stamp_label(1.5, 2.5, label = " \n\n\n\n\n", * size = 15, * fill = "lemonchiffon", ) ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_05_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + stamp_point(color = "plum4") + stamp_point(x = 1, y = 1, color = "lightsteelblue3", size = 35) + stamp_arrow(color = "plum4", headlength = .06, type = "closed") + stamp_label(1.5, 2.5, label = " \n\n\n\n\n", size = 15, fill = "lemonchiffon", ) + * stamp_bubble(2.5, 1.25, size = 100, * color = "plum4") ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_06_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + stamp_point(color = "plum4") + stamp_point(x = 1, y = 1, color = "lightsteelblue3", size = 35) + stamp_arrow(color = "plum4", headlength = .06, type = "closed") + stamp_label(1.5, 2.5, label = " \n\n\n\n\n", size = 15, fill = "lemonchiffon", ) + stamp_bubble(2.5, 1.25, size = 100, color = "plum4") + * stamp_point(x = c(2,2:4), y = 1:4, * color = "paleturquoise", * size = 15) ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_07_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + stamp_point(color = "plum4") + stamp_point(x = 1, y = 1, color = "lightsteelblue3", size = 35) + stamp_arrow(color = "plum4", headlength = .06, type = "closed") + stamp_label(1.5, 2.5, label = " \n\n\n\n\n", size = 15, fill = "lemonchiffon", ) + stamp_bubble(2.5, 1.25, size = 100, color = "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") ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_08_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + stamp_point(color = "plum4") + stamp_point(x = 1, y = 1, color = "lightsteelblue3", size = 35) + stamp_arrow(color = "plum4", headlength = .06, type = "closed") + stamp_label(1.5, 2.5, label = " \n\n\n\n\n", size = 15, fill = "lemonchiffon", ) + stamp_bubble(2.5, 1.25, size = 100, color = "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") ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_09_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + stamp_point(color = "plum4") + stamp_point(x = 1, y = 1, color = "lightsteelblue3", size = 35) + stamp_arrow(color = "plum4", headlength = .06, type = "closed") + stamp_label(1.5, 2.5, label = " \n\n\n\n\n", size = 15, fill = "lemonchiffon", ) + stamp_bubble(2.5, 1.25, size = 100, color = "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") ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_10_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + stamp_point(color = "plum4") + stamp_point(x = 1, y = 1, color = "lightsteelblue3", size = 35) + stamp_arrow(color = "plum4", headlength = .06, type = "closed") + stamp_label(1.5, 2.5, label = " \n\n\n\n\n", size = 15, fill = "lemonchiffon", ) + stamp_bubble(2.5, 1.25, size = 100, color = "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") ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_11_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + stamp_point(color = "plum4") + stamp_point(x = 1, y = 1, color = "lightsteelblue3", size = 35) + stamp_arrow(color = "plum4", headlength = .06, type = "closed") + stamp_label(1.5, 2.5, label = " \n\n\n\n\n", size = 15, fill = "lemonchiffon", ) + stamp_bubble(2.5, 1.25, size = 100, color = "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() ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_12_output-1.png)<!-- --> ] --- count: false .panel1-arrows-auto[ ```r ggcanvas() + stamp_point(color = "plum4") + stamp_point(x = 1, y = 1, color = "lightsteelblue3", size = 35) + stamp_arrow(color = "plum4", headlength = .06, type = "closed") + stamp_label(1.5, 2.5, label = " \n\n\n\n\n", size = 15, fill = "lemonchiffon", ) + stamp_bubble(2.5, 1.25, size = 100, color = "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) ``` ] .panel2-arrows-auto[ ![](flipbook_files/figure-html/arrows_auto_13_output-1.png)<!-- --> ] <style> .panel1-arrows-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-arrows-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-arrows-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-spoke_ellipse-auto[ ```r *ggplot(data = faithful) ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_01_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + * aes(x = eruptions, * y = waiting/30 - 1.75, * color = waiting) ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_02_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + aes(x = eruptions, y = waiting/30 - 1.75, color = waiting) + * coord_equal() ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_03_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + aes(x = eruptions, y = waiting/30 - 1.75, color = waiting) + coord_equal() + * scale_color_viridis_c(option = "magma", * direction = -1) ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_04_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + aes(x = eruptions, y = waiting/30 - 1.75, color = waiting) + coord_equal() + scale_color_viridis_c(option = "magma", direction = -1) + * geom_point(show.legend = F) ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_05_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + aes(x = eruptions, y = waiting/30 - 1.75, color = waiting) + coord_equal() + scale_color_viridis_c(option = "magma", direction = -1) + geom_point(show.legend = F) + * stamp_polygon(fill = "plum", * size = 0, * n = 50, * x0 = 5, y0 = -1) ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_06_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + aes(x = eruptions, y = waiting/30 - 1.75, color = waiting) + coord_equal() + scale_color_viridis_c(option = "magma", direction = -1) + geom_point(show.legend = F) + stamp_polygon(fill = "plum", size = 0, n = 50, x0 = 5, y0 = -1) + * stamp_spoke(angle = pi* 0:32/64, * color = "paleturquoise4", * size = 1, * x = 5, y = -1) ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_07_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + aes(x = eruptions, y = waiting/30 - 1.75, color = waiting) + coord_equal() + scale_color_viridis_c(option = "magma", direction = -1) + geom_point(show.legend = F) + stamp_polygon(fill = "plum", size = 0, n = 50, x0 = 5, y0 = -1) + stamp_spoke(angle = pi* 0:32/64, color = "paleturquoise4", size = 1, x = 5, y = -1) + * stamp_spoke(angle = pi*0:3/6, * color = "plum4", * x = 5, y = -1) ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_08_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + aes(x = eruptions, y = waiting/30 - 1.75, color = waiting) + coord_equal() + scale_color_viridis_c(option = "magma", direction = -1) + geom_point(show.legend = F) + stamp_polygon(fill = "plum", size = 0, n = 50, x0 = 5, y0 = -1) + stamp_spoke(angle = pi* 0:32/64, color = "paleturquoise4", size = 1, x = 5, y = -1) + stamp_spoke(angle = pi*0:3/6, color = "plum4", x = 5, y = -1) + * stamp_ellipse(alpha = .5, * a = 2.2, b = 1, * x0 = 3.2, y0 = .65, * angle = .12*pi) ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_09_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + aes(x = eruptions, y = waiting/30 - 1.75, color = waiting) + coord_equal() + scale_color_viridis_c(option = "magma", direction = -1) + geom_point(show.legend = F) + stamp_polygon(fill = "plum", size = 0, n = 50, x0 = 5, y0 = -1) + stamp_spoke(angle = pi* 0:32/64, color = "paleturquoise4", size = 1, x = 5, y = -1) + stamp_spoke(angle = pi*0:3/6, color = "plum4", x = 5, y = -1) + stamp_ellipse(alpha = .5, a = 2.2, b = 1, x0 = 3.2, y0 = .65, angle = .12*pi) + * stamp_ellipse(x0 = 6:11/3, * y = -4:-9/4, * a = .25, * b = .4, * alpha = .2, * angle = pi*0:-5/5, * fill = "slateblue", * size = 0) ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_10_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + aes(x = eruptions, y = waiting/30 - 1.75, color = waiting) + coord_equal() + scale_color_viridis_c(option = "magma", direction = -1) + geom_point(show.legend = F) + stamp_polygon(fill = "plum", size = 0, n = 50, x0 = 5, y0 = -1) + stamp_spoke(angle = pi* 0:32/64, color = "paleturquoise4", size = 1, x = 5, y = -1) + stamp_spoke(angle = pi*0:3/6, color = "plum4", x = 5, y = -1) + stamp_ellipse(alpha = .5, a = 2.2, b = 1, x0 = 3.2, y0 = .65, angle = .12*pi) + stamp_ellipse(x0 = 6:11/3, y = -4:-9/4, a = .25, b = .4, alpha = .2, angle = pi*0:-5/5, fill = "slateblue", size = 0) + * theme_void() ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_11_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + aes(x = eruptions, y = waiting/30 - 1.75, color = waiting) + coord_equal() + scale_color_viridis_c(option = "magma", direction = -1) + geom_point(show.legend = F) + stamp_polygon(fill = "plum", size = 0, n = 50, x0 = 5, y0 = -1) + stamp_spoke(angle = pi* 0:32/64, color = "paleturquoise4", size = 1, x = 5, y = -1) + stamp_spoke(angle = pi*0:3/6, color = "plum4", x = 5, y = -1) + stamp_ellipse(alpha = .5, a = 2.2, b = 1, x0 = 3.2, y0 = .65, angle = .12*pi) + stamp_ellipse(x0 = 6:11/3, y = -4:-9/4, a = .25, b = .4, alpha = .2, angle = pi*0:-5/5, fill = "slateblue", size = 0) + theme_void() + * theme(panel.background = * element_rect(fill = "snow2", * color = "snow2")) ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_12_output-1.png)<!-- --> ] --- count: false .panel1-spoke_ellipse-auto[ ```r ggplot(data = faithful) + aes(x = eruptions, y = waiting/30 - 1.75, color = waiting) + coord_equal() + scale_color_viridis_c(option = "magma", direction = -1) + geom_point(show.legend = F) + stamp_polygon(fill = "plum", size = 0, n = 50, x0 = 5, y0 = -1) + stamp_spoke(angle = pi* 0:32/64, color = "paleturquoise4", size = 1, x = 5, y = -1) + stamp_spoke(angle = pi*0:3/6, color = "plum4", x = 5, y = -1) + stamp_ellipse(alpha = .5, a = 2.2, b = 1, x0 = 3.2, y0 = .65, angle = .12*pi) + stamp_ellipse(x0 = 6:11/3, y = -4:-9/4, a = .25, b = .4, alpha = .2, angle = pi*0:-5/5, fill = "slateblue", size = 0) + theme_void() + theme(panel.background = element_rect(fill = "snow2", color = "snow2")) ``` ] .panel2-spoke_ellipse-auto[ ![](flipbook_files/figure-html/spoke_ellipse_auto_13_output-1.png)<!-- --> ] <style> .panel1-spoke_ellipse-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-spoke_ellipse-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-spoke_ellipse-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-polygon-auto[ ```r *ggcanvas() ``` ] .panel2-polygon-auto[ ![](flipbook_files/figure-html/polygon_auto_01_output-1.png)<!-- --> ] --- count: false .panel1-polygon-auto[ ```r ggcanvas() + * stamp_polygon(color = "turquoise4", * radius = 3, n = 5, * fill = "turquoise") ``` ] .panel2-polygon-auto[ ![](flipbook_files/figure-html/polygon_auto_02_output-1.png)<!-- --> ] --- count: false .panel1-polygon-auto[ ```r ggcanvas() + stamp_polygon(color = "turquoise4", radius = 3, n = 5, fill = "turquoise") + * stamp_polygon(fill = "slateblue2", * radius = 2, * n = 7) ``` ] .panel2-polygon-auto[ ![](flipbook_files/figure-html/polygon_auto_03_output-1.png)<!-- --> ] --- count: false .panel1-polygon-auto[ ```r ggcanvas() + stamp_polygon(color = "turquoise4", radius = 3, n = 5, fill = "turquoise") + stamp_polygon(fill = "slateblue2", radius = 2, n = 7) + * stamp_polygon(linetype = "dashed", * alpha = .5, * x0 = 1:2, * fill = "plum2") ``` ] .panel2-polygon-auto[ ![](flipbook_files/figure-html/polygon_auto_04_output-1.png)<!-- --> ] --- count: false .panel1-polygon-auto[ ```r ggcanvas() + stamp_polygon(color = "turquoise4", radius = 3, n = 5, fill = "turquoise") + stamp_polygon(fill = "slateblue2", radius = 2, n = 7) + stamp_polygon(linetype = "dashed", alpha = .5, x0 = 1:2, fill = "plum2") + * stamp_polygon(x0 = 1, y0 = 1.5, * n = 3, rotation = .25, * size = 0, * fill = "goldenrod2") ``` ] .panel2-polygon-auto[ ![](flipbook_files/figure-html/polygon_auto_05_output-1.png)<!-- --> ] --- count: false .panel1-polygon-auto[ ```r ggcanvas() + stamp_polygon(color = "turquoise4", radius = 3, n = 5, fill = "turquoise") + stamp_polygon(fill = "slateblue2", radius = 2, n = 7) + stamp_polygon(linetype = "dashed", alpha = .5, x0 = 1:2, fill = "plum2") + stamp_polygon(x0 = 1, y0 = 1.5, n = 3, rotation = .25, size = 0, fill = "goldenrod2") + * stamp_polygon(n = 50, * radius = .2, * size = 0) ``` ] .panel2-polygon-auto[ ![](flipbook_files/figure-html/polygon_auto_06_output-1.png)<!-- --> ] --- count: false .panel1-polygon-auto[ ```r ggcanvas() + stamp_polygon(color = "turquoise4", radius = 3, n = 5, fill = "turquoise") + stamp_polygon(fill = "slateblue2", radius = 2, n = 7) + stamp_polygon(linetype = "dashed", alpha = .5, x0 = 1:2, fill = "plum2") + stamp_polygon(x0 = 1, y0 = 1.5, n = 3, rotation = .25, size = 0, fill = "goldenrod2") + stamp_polygon(n = 50, radius = .2, size = 0) + * stamp_spoke(angle = pi * 1:7/15, * radius = 2) ``` ] .panel2-polygon-auto[ ![](flipbook_files/figure-html/polygon_auto_07_output-1.png)<!-- --> ] <style> .panel1-polygon-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-polygon-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-polygon-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-spoke_positions-auto[ ```r *ggcanvas() ``` ] .panel2-spoke_positions-auto[ ![](flipbook_files/figure-html/spoke_positions_auto_01_output-1.png)<!-- --> ] --- count: false .panel1-spoke_positions-auto[ ```r ggcanvas() + * stamp_label(label = "hello", * x = spoke_x(n = 5), * y = spoke_y(n = 5), size = 3) ``` ] .panel2-spoke_positions-auto[ ![](flipbook_files/figure-html/spoke_positions_auto_02_output-1.png)<!-- --> ] --- count: false .panel1-spoke_positions-auto[ ```r ggcanvas() + stamp_label(label = "hello", x = spoke_x(n = 5), y = spoke_y(n = 5), size = 3) + * stamp_point(x = spoke_x(n = 5, rot = 0), * y = spoke_y(n = 5, rot = 0)) ``` ] .panel2-spoke_positions-auto[ ![](flipbook_files/figure-html/spoke_positions_auto_03_output-1.png)<!-- --> ] --- count: false .panel1-spoke_positions-auto[ ```r ggcanvas() + stamp_label(label = "hello", x = spoke_x(n = 5), y = spoke_y(n = 5), size = 3) + stamp_point(x = spoke_x(n = 5, rot = 0), y = spoke_y(n = 5, rot = 0)) + * stamp_label(label = c("hi", "bye", "chao"), * size = 4, * x = spoke_x(n = 3, rotation = -.5, radius = .5), * y = spoke_y(n = 3, rotation = -.5, radius = .5)) ``` ] .panel2-spoke_positions-auto[ ![](flipbook_files/figure-html/spoke_positions_auto_04_output-1.png)<!-- --> ] --- count: false .panel1-spoke_positions-auto[ ```r ggcanvas() + stamp_label(label = "hello", x = spoke_x(n = 5), y = spoke_y(n = 5), size = 3) + stamp_point(x = spoke_x(n = 5, rot = 0), y = spoke_y(n = 5, rot = 0)) + stamp_label(label = c("hi", "bye", "chao"), size = 4, x = spoke_x(n = 3, rotation = -.5, radius = .5), y = spoke_y(n = 3, rotation = -.5, radius = .5)) + * stamp_polygon(x0 = wrap_x(x0 = 0, n = 5, ncol = 3), * y0 = wrap_y(y0 = 3, n = 5, ncol = 3), * radius = .4) ``` ] .panel2-spoke_positions-auto[ ![](flipbook_files/figure-html/spoke_positions_auto_05_output-1.png)<!-- --> ] <style> .panel1-spoke_positions-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-spoke_positions-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-spoke_positions-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-png-auto[ ```r *download.file(url = "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png", * destfile = "wiki.png") ``` ] .panel2-png-auto[ ] --- count: false .panel1-png-auto[ ```r download.file(url = "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png", destfile = "wiki.png") *ggcanvas() ``` ] .panel2-png-auto[ ![](flipbook_files/figure-html/png_auto_02_output-1.png)<!-- --> ] --- count: false .panel1-png-auto[ ```r download.file(url = "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png", destfile = "wiki.png") ggcanvas() + * stamp_png(x0y0 = wrap_png()) ``` ] .panel2-png-auto[ ![](flipbook_files/figure-html/png_auto_03_output-1.png)<!-- --> ] --- count: false .panel1-png-auto[ ```r download.file(url = "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png", destfile = "wiki.png") ggcanvas() + stamp_png(x0y0 = wrap_png()) + * stamp_png(x0y0 = wrap_png(y0 = -3, n = 8)) ``` ] .panel2-png-auto[ ![](flipbook_files/figure-html/png_auto_04_output-1.png)<!-- --> ] --- count: false .panel1-png-auto[ ```r download.file(url = "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png", destfile = "wiki.png") ggcanvas() + stamp_png(x0y0 = wrap_png()) + stamp_png(x0y0 = wrap_png(y0 = -3, n = 8)) + * stamp_png(x0y0 = wrap_png(y0 = -7.5, n = 3)) ``` ] .panel2-png-auto[ ![](flipbook_files/figure-html/png_auto_05_output-1.png)<!-- --> ] --- count: false .panel1-png-auto[ ```r download.file(url = "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png", destfile = "wiki.png") ggcanvas() + stamp_png(x0y0 = wrap_png()) + stamp_png(x0y0 = wrap_png(y0 = -3, n = 8)) + stamp_png(x0y0 = wrap_png(y0 = -7.5, n = 3)) + * stamp_png(x0 = 4, y0 = -1, width = 3) ``` ] .panel2-png-auto[ ![](flipbook_files/figure-html/png_auto_06_output-1.png)<!-- --> ] --- count: false .panel1-png-auto[ ```r download.file(url = "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png", destfile = "wiki.png") ggcanvas() + stamp_png(x0y0 = wrap_png()) + stamp_png(x0y0 = wrap_png(y0 = -3, n = 8)) + stamp_png(x0y0 = wrap_png(y0 = -7.5, n = 3)) + stamp_png(x0 = 4, y0 = -1, width = 3) + * theme_void() ``` ] .panel2-png-auto[ ![](flipbook_files/figure-html/png_auto_07_output-1.png)<!-- --> ] --- count: false .panel1-png-auto[ ```r download.file(url = "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png", destfile = "wiki.png") ggcanvas() + stamp_png(x0y0 = wrap_png()) + stamp_png(x0y0 = wrap_png(y0 = -3, n = 8)) + stamp_png(x0y0 = wrap_png(y0 = -7.5, n = 3)) + stamp_png(x0 = 4, y0 = -1, width = 3) + theme_void() ``` ] .panel2-png-auto[ ![](flipbook_files/figure-html/png_auto_08_output-1.png)<!-- --> ] <style> .panel1-png-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-png-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-png-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-backdrop-auto[ ```r #only supports pngs for now *magick::image_read("https://images.unsplash.com/photo-1593448806592-409752fd816b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80") ``` ] .panel2-backdrop-auto[ <img src="flipbook_files/figure-html/backdrop_auto_01_output-1.png" width="2000" /> ] --- count: false .panel1-backdrop-auto[ ```r #only supports pngs for now magick::image_read("https://images.unsplash.com/photo-1593448806592-409752fd816b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80") %>% * magick::image_resize("300x") ``` ] .panel2-backdrop-auto[ <img src="flipbook_files/figure-html/backdrop_auto_02_output-1.png" width="400" /> ] --- count: false .panel1-backdrop-auto[ ```r #only supports pngs for now magick::image_read("https://images.unsplash.com/photo-1593448806592-409752fd816b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80") %>% magick::image_resize("300x") %>% * magick::image_write("stamp.png", * format = "png") ``` ] .panel2-backdrop-auto[ ] --- count: false .panel1-backdrop-auto[ ```r #only supports pngs for now magick::image_read("https://images.unsplash.com/photo-1593448806592-409752fd816b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80") %>% magick::image_resize("300x") %>% magick::image_write("stamp.png", format = "png") *ggbackdrop(png = "stamp.png") ``` ] .panel2-backdrop-auto[ ![](flipbook_files/figure-html/backdrop_auto_04_output-1.png)<!-- --> ] --- count: false .panel1-backdrop-auto[ ```r #only supports pngs for now magick::image_read("https://images.unsplash.com/photo-1593448806592-409752fd816b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80") %>% magick::image_resize("300x") %>% magick::image_write("stamp.png", format = "png") ggbackdrop(png = "stamp.png") + * stamp_curve(curvature = .3, yend = .5) ``` ] .panel2-backdrop-auto[ ![](flipbook_files/figure-html/backdrop_auto_05_output-1.png)<!-- --> ] --- count: false .panel1-backdrop-auto[ ```r #only supports pngs for now magick::image_read("https://images.unsplash.com/photo-1593448806592-409752fd816b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80") %>% magick::image_resize("300x") %>% magick::image_write("stamp.png", format = "png") ggbackdrop(png = "stamp.png") + stamp_curve(curvature = .3, yend = .5) + * stamp_polygon(x0 = .8, * y0 = .4, * radius = .2, * alpha = 0, * color = "grey97") ``` ] .panel2-backdrop-auto[ ![](flipbook_files/figure-html/backdrop_auto_06_output-1.png)<!-- --> ] --- count: false .panel1-backdrop-auto[ ```r #only supports pngs for now magick::image_read("https://images.unsplash.com/photo-1593448806592-409752fd816b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80") %>% magick::image_resize("300x") %>% magick::image_write("stamp.png", format = "png") ggbackdrop(png = "stamp.png") + stamp_curve(curvature = .3, yend = .5) + stamp_polygon(x0 = .8, y0 = .4, radius = .2, alpha = 0, color = "grey97") + * stamp_text(x = .8, y = .4, * label = "{ggstamp}", * color = "grey97") ``` ] .panel2-backdrop-auto[ ![](flipbook_files/figure-html/backdrop_auto_07_output-1.png)<!-- --> ] --- count: false .panel1-backdrop-auto[ ```r #only supports pngs for now magick::image_read("https://images.unsplash.com/photo-1593448806592-409752fd816b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80") %>% magick::image_resize("300x") %>% magick::image_write("stamp.png", format = "png") ggbackdrop(png = "stamp.png") + stamp_curve(curvature = .3, yend = .5) + stamp_polygon(x0 = .8, y0 = .4, radius = .2, alpha = 0, color = "grey97") + stamp_text(x = .8, y = .4, label = "{ggstamp}", color = "grey97") + * theme_void() ``` ] .panel2-backdrop-auto[ ![](flipbook_files/figure-html/backdrop_auto_08_output-1.png)<!-- --> ] --- count: false .panel1-backdrop-auto[ ```r #only supports pngs for now magick::image_read("https://images.unsplash.com/photo-1593448806592-409752fd816b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80") %>% magick::image_resize("300x") %>% magick::image_write("stamp.png", format = "png") ggbackdrop(png = "stamp.png") + stamp_curve(curvature = .3, yend = .5) + stamp_polygon(x0 = .8, y0 = .4, radius = .2, alpha = 0, color = "grey97") + stamp_text(x = .8, y = .4, label = "{ggstamp}", color = "grey97") + theme_void() ``` ] .panel2-backdrop-auto[ ![](flipbook_files/figure-html/backdrop_auto_09_output-1.png)<!-- --> ] <style> .panel1-backdrop-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-backdrop-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-backdrop-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-the_stamps-replace[ ```r library(ggstamp) ggcanvas() + * stamp_point() ``` ] .panel2-the_stamps-replace[ ![](flipbook_files/figure-html/the_stamps_replace_01_output-1.png)<!-- --> ] --- count: false .panel1-the_stamps-replace[ ```r library(ggstamp) ggcanvas() + * stamp_segment() ``` ] .panel2-the_stamps-replace[ ![](flipbook_files/figure-html/the_stamps_replace_02_output-1.png)<!-- --> ] --- count: false .panel1-the_stamps-replace[ ```r library(ggstamp) ggcanvas() + * stamp_arrow() ``` ] .panel2-the_stamps-replace[ ![](flipbook_files/figure-html/the_stamps_replace_03_output-1.png)<!-- --> ] --- count: false .panel1-the_stamps-replace[ ```r library(ggstamp) ggcanvas() + * stamp_curve() ``` ] .panel2-the_stamps-replace[ ![](flipbook_files/figure-html/the_stamps_replace_04_output-1.png)<!-- --> ] --- count: false .panel1-the_stamps-replace[ ```r library(ggstamp) ggcanvas() + * stamp_spoke() ``` ] .panel2-the_stamps-replace[ ![](flipbook_files/figure-html/the_stamps_replace_05_output-1.png)<!-- --> ] --- count: false .panel1-the_stamps-replace[ ```r library(ggstamp) ggcanvas() + * stamp_text() ``` ] .panel2-the_stamps-replace[ ![](flipbook_files/figure-html/the_stamps_replace_06_output-1.png)<!-- --> ] --- count: false .panel1-the_stamps-replace[ ```r library(ggstamp) ggcanvas() + * stamp_label() ``` ] .panel2-the_stamps-replace[ ![](flipbook_files/figure-html/the_stamps_replace_07_output-1.png)<!-- --> ] --- count: false .panel1-the_stamps-replace[ ```r library(ggstamp) ggcanvas() + * stamp_tile() ``` ] .panel2-the_stamps-replace[ ![](flipbook_files/figure-html/the_stamps_replace_08_output-1.png)<!-- --> ] --- count: false .panel1-the_stamps-replace[ ```r library(ggstamp) ggcanvas() + * stamp_polygon() ``` ] .panel2-the_stamps-replace[ ![](flipbook_files/figure-html/the_stamps_replace_09_output-1.png)<!-- --> ] <style> .panel1-the_stamps-replace { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-the_stamps-replace { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-the_stamps-replace { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-the_stamps_functions-replace[ ```r library(ggstamp) *stamp_point ``` ] .panel2-the_stamps_functions-replace[ ``` function(x = 0, y = 0, size = 8, alpha = 1, shape = "circle", color = "black", stroke = 1, fill = "grey35", xy = NULL){ if(!is.null(xy)){ x = xy[,1] y = xy[,2] } annotate(geom = "point", x = x, y = y, size = size, alpha = alpha, shape = shape, color = color, stroke = stroke, fill = fill ) } <bytecode: 0x7fb6ccd7b0a8> <environment: namespace:ggstamp> ``` ] --- count: false .panel1-the_stamps_functions-replace[ ```r library(ggstamp) *stamp_segment ``` ] .panel2-the_stamps_functions-replace[ ``` function(x = 0, xend = 1, y = 0, yend = 1, size = 1.5, alpha = 1, color = "black"){ annotate(geom = "segment", x = x, y = y, xend = xend, yend = yend, size = size, alpha = alpha, color = color) } <bytecode: 0x7fb6cc6b9d20> <environment: namespace:ggstamp> ``` ] --- count: false .panel1-the_stamps_functions-replace[ ```r library(ggstamp) *stamp_arrow ``` ] .panel2-the_stamps_functions-replace[ ``` function(x = 0, xend = 1, y = 0, yend = 1, size = 1.5, alpha = 1, color = "black", ends = "last", units = "npc", headlength = .03, angle = 30, type = "open"){ annotate(geom = "segment", x = x, y = y, arrow = arrow(ends = ends, type = type, angle = angle, length = unit(x = headlength, units = "npc")), xend = xend, yend = yend, size = size, alpha = alpha, color = color) } <bytecode: 0x7fb6cda5d5c0> <environment: namespace:ggstamp> ``` ] --- count: false .panel1-the_stamps_functions-replace[ ```r library(ggstamp) *stamp_curve ``` ] .panel2-the_stamps_functions-replace[ ``` function(x = 0, xend = 1, y = 0, yend = 1, alpha = 1, color = "black", linetype = "solid", size = 1.5, curvature = .1 ){ annotate(geom = "curve", x = x, y = y, xend = xend, yend = yend, linetype = linetype, size = size, alpha = alpha, curvature = curvature, color = color) } <bytecode: 0x7fb6c64a5848> <environment: namespace:ggstamp> ``` ] --- count: false .panel1-the_stamps_functions-replace[ ```r library(ggstamp) *stamp_spoke ``` ] .panel2-the_stamps_functions-replace[ ``` function(x = 0, y = 0, angle = pi/4, radius = 1, size = 1.5, alpha = 1, color = "black", linetype = "solid"){ annotate(geom = "spoke", x = x, y = y, radius = radius, angle = angle, size = size, alpha = alpha, color = color, linetype = linetype) } <bytecode: 0x7fb6ca32a888> <environment: namespace:ggstamp> ``` ] --- count: false .panel1-the_stamps_functions-replace[ ```r library(ggstamp) *stamp_text ``` ] .panel2-the_stamps_functions-replace[ ``` function(x = 0, y = 0, label = "some\n text", size = 8, alpha = 1, angle = 0, color = "black", lineheight = .8, family = "", vjust = .5, xy = NULL){ if(!is.null(xy)){ x = xy[,1] y = xy[,2] } annotate(geom = "text", x = x, y = y, lineheight = lineheight, label = label, size = size, color = color, angle = angle, alpha = alpha, vjust = vjust) } <bytecode: 0x7fb6c922cc40> <environment: namespace:ggstamp> ``` ] --- count: false .panel1-the_stamps_functions-replace[ ```r library(ggstamp) *stamp_label ``` ] .panel2-the_stamps_functions-replace[ ``` function(x = 0, y = 0, label = "use label\nargument to change\nthis label", size = 8, alpha = 1, angle = 0, color = "black", fill = "white", lineheight = .8, family = "", vjust = .5, label.padding = ggplot2::unit(0.5, units = "lines"), xy = NULL){ if(!is.null(xy)){ x = xy[,1] y = xy[,2] } annotate(geom = "label", x = x, y = y, fill = fill, label = label, lineheight = lineheight, label.padding = label.padding, size = size) } <bytecode: 0x7fb6cb082558> <environment: namespace:ggstamp> ``` ] --- count: false .panel1-the_stamps_functions-replace[ ```r library(ggstamp) *stamp_tile ``` ] .panel2-the_stamps_functions-replace[ ``` function(x = 0, y = 0, size = .5, alpha = 1, color = "black", fill = "grey85", height = 1, linetype = "solid", width = 1, xy = NULL ){ if(!is.null(xy)){ x = xy[,1] y = xy[,2] } annotate(geom = "tile", x = x, y = y, alpha = alpha, color = color, fill = fill, height = height, linetype = linetype, size = size, width = width ) } <bytecode: 0x7fb6ca1a4ee8> <environment: namespace:ggstamp> ``` ] --- count: false .panel1-the_stamps_functions-replace[ ```r library(ggstamp) *stamp_polygon ``` ] .panel2-the_stamps_functions-replace[ ``` function(x0 = 0, y0 = 0, n = 6, radius = 1, size = 1.5, alpha = 1, rotation = -.5, linetype = "solid", fill = "grey35", color = "black", x0y0 = NULL){ if(!is.null(x0y0)){ x0 = x0y0[,1] y0 = x0y0[,2] } groups <- max(c(length(x0), length(y0))) tibble::tibble(x0, y0, group = 1:groups) %>% tidyr::crossing(the_n = 1:n) %>% dplyr::mutate( x = x0 + radius * cos(-2*pi*0:(n-1)/n - rotation * pi), y = y0 + radius * sin(-2*pi*0:(n-1)/n - rotation * pi) ) -> df annotate(geom = "polygon", x = df$x, y = df$y, size = size, fill = fill, alpha = alpha, linetype = linetype, color = color, group = df$group ) } <bytecode: 0x7fb6cb881e00> <environment: namespace:ggstamp> ``` ] <style> .panel1-the_stamps_functions-replace { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-the_stamps_functions-replace { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-the_stamps_functions-replace { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-the_wraps-replace[ ```r ggcanvas() + * stamp_polygon(x0y0 = wrap(n = 7), radius = .4) ``` ] .panel2-the_wraps-replace[ ![](flipbook_files/figure-html/the_wraps_replace_01_output-1.png)<!-- --> ] --- count: false .panel1-the_wraps-replace[ ```r ggcanvas() + * stamp_polygon(x0y0 = spoke(n = 7), radius = .4) ``` ] .panel2-the_wraps-replace[ ![](flipbook_files/figure-html/the_wraps_replace_02_output-1.png)<!-- --> ] --- count: false .panel1-the_wraps-replace[ ```r ggcanvas() + * stamp_polygon(x0y0 = honeycomb(n = 7), radius = .4) ``` ] .panel2-the_wraps-replace[ ![](flipbook_files/figure-html/the_wraps_replace_03_output-1.png)<!-- --> ] <style> .panel1-the_wraps-replace { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-the_wraps-replace { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-the_wraps-replace { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-the_wraps_functions-replace[ ```r *wrap_y ``` ] .panel2-the_wraps_functions-replace[ ``` function(y0 = 0, n = 5, ncol = 3, height = 1){ -(0:(n-1) %/% ncol)*height + y0 } <bytecode: 0x7f934afc8b68> <environment: namespace:ggstamp> ``` ] --- count: false .panel1-the_wraps_functions-replace[ ```r *spoke_y ``` ] .panel2-the_wraps_functions-replace[ ``` function(y0 = 0, n = 5, radius = 1, rotation = -.5){ radius * sin(-2*pi*0:(n-1)/n - rotation * pi) + y0 } <bytecode: 0x7f934c429a88> <environment: namespace:ggstamp> ``` ] --- count: false .panel1-the_wraps_functions-replace[ ```r *honeycomb_y ``` ] .panel2-the_wraps_functions-replace[ ``` function(y0 = 0, n = 5, ncol = 3, height = 1.5){ -(0:(n-1) %/% ncol)*height + y0 } <bytecode: 0x7f934bba1480> <environment: namespace:ggstamp> ``` ] <style> .panel1-the_wraps_functions-replace { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-the_wraps_functions-replace { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-the_wraps_functions-replace { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> <style type="text/css"> .remark-code{line-height: 1.5; font-size: 78%} @media print { .has-continuation { display: block; } } code.r.hljs.remark-code{ position: relative; overflow-x: hidden; } code.r.hljs.remark-code:hover{ overflow-x:visible; width: 500px; border-style: solid; } </style>