knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(dplyr) library(purrr) library(sf) library(packcircles) library(ggplot2) library(ishihara)
library(ishihara)
Here's the goal:
packcircles
.circle_plate <- create_circle_plate()
sf
spatial object.circle_plate_sf <- cast_packing_poly(circle_plate)
letter_s <- glyph("s") %>% font_rescale(circle_plate)
letter_s_sf <- cast_font_sf(letter_s)
overlayed_circle <- overlay_text_in_circle(circle_plate_sf, letter_s_sf)
gg_ishihara <- ggplot(overlayed_circle) + geom_sf(aes(fill = in_text), colour = "white") + theme_void() + theme(legend.position = "none")
gg_ishihara + scale_fill_viridis_d()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.