Skip to content

Commit

Permalink
Issue #353: Improvements to logo (#361)
Browse files Browse the repository at this point in the history
* Proposal for better logo

* usethis::use_logo and pkgdown::build_favicons
  • Loading branch information
athowes authored Oct 2, 2024
1 parent 5fb3b38 commit fa03f60
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions inst/make_hexsticker.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
library(hexSticker)
library(sysfonts)
library(ggplot2)
library(dplyr)

# font setup
font_add_google("Zilla Slab Highlight", "useme")

# make standard plot
outbreak <- simulate_gillespie(seed = 101)

Expand Down Expand Up @@ -45,7 +41,7 @@ hex_plot <- combined_obs |>
fun = dlnorm, args = c(meanlog, sdlog), n = 100,
col = "#696767b1"
) +
scale_fill_brewer(palette = "Set2", direction = 1) +
scale_fill_brewer(palette = "Blues", direction = 1) +
scale_y_continuous(breaks = NULL) +
labs(x = "", y = "") +
theme_void() +
Expand All @@ -58,16 +54,21 @@ hex_plot <- combined_obs |>
# Make and save hexsticker
sticker(
hex_plot,
s_x = 1,
s_y = 0.85,
s_width = 2.4,
s_height = 1.9,
package = "epidist",
p_size = 23,
p_color = "#646770",
p_x = 1.3,
p_y = 1.15,
s_x = 0.85,
s_y = 1,
s_width = 1.2,
s_height = 1.2,
p_size = 42,
p_x = 1.35,
p_y = 1.1,
h_fill = "#ffffff",
h_color = "#646770",
filename = file.path("man", "figures", "logo.png")
filename = file.path("man", "figures", "logo.png"),
dpi = 600,
white_around_sticker = TRUE
)

usethis::use_logo(file.path("man", "figures", "logo.png"))
pkgdown::build_favicons(pkg = ".", overwrite = TRUE)
Binary file modified man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/favicon.ico
Binary file not shown.

0 comments on commit fa03f60

Please sign in to comment.