diff --git a/README.Rmd b/README.Rmd index e93a6ca..8b1d7b2 100644 --- a/README.Rmd +++ b/README.Rmd @@ -15,7 +15,7 @@ knitr::opts_chunk$set( ) ``` -# fCWTr +# fCWTr fCWTr website diff --git a/README.md b/README.md index 154e996..672f7ae 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# fCWTr +# fCWTr fCWTr website diff --git a/data-raw/hex-logo.R b/data-raw/hex-logo.R new file mode 100644 index 0000000..c876678 --- /dev/null +++ b/data-raw/hex-logo.R @@ -0,0 +1,47 @@ +library(hexSticker) +library(tidyverse) +library(showtext) + +## Loading Google fonts (http://www.google.com/fonts) +font_add_google("Tiny5", db_cache = FALSE) +font_add_google("Micro 5", db_cache = FALSE) + + +morlet <- function(x, sigma) { + exp(-x^2) * sin(2 * pi * x * sigma) +} + +p <- + tibble(x = seq(-2.5, 2.5, by = 0.025)) |> + mutate( + y = morlet(x, 1), + c = abs(x) + ) |> + ggplot(aes(x = x, y = y)) + + # geom_line(linewidth = 1.5) + + geom_point(size = 0.8, shape = "square") + + # scale_color_viridis() + + theme_void() + + theme( + legend.position = "none" + ) +p + +# hexSticker conventions (by experiment) +# (x,y) = (1,1) seems to be the center of hex +# (x,y) = (0,0) is left bottom corner + +sticker( + p, + package = "", + s_x = 1, s_y = 1, + s_width = 2, s_height = 1.6, + h_fill = "white", + h_color = "black", + url = "fCWTr", + u_size = 26, + u_family = "Micro 5", + u_x = 1.15, + u_y = 0.23, + filename = "inst/figures/hex-logo.png" +) |> plot() diff --git a/inst/figures/hex-logo.png b/inst/figures/hex-logo.png new file mode 100644 index 0000000..6d909b2 Binary files /dev/null and b/inst/figures/hex-logo.png differ diff --git a/man/figures/logo.png b/man/figures/logo.png new file mode 100644 index 0000000..58266ac Binary files /dev/null and b/man/figures/logo.png differ