Skip to content

Commit

Permalink
Minor updates and fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
leonawicz committed Sep 10, 2024
1 parent 25e44fa commit 495175a
Show file tree
Hide file tree
Showing 17 changed files with 79 additions and 74 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# memery 0.6.0

* Documentation updates.
* Minor code updates and fixes.

# memery 0.5.7

Expand Down
4 changes: 2 additions & 2 deletions R/car_shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#' file <- "memery-car-shiny.gif" # outfile
#' set.seed(1)
#' p1 <- ggplot(data.frame(x = rbeta(100000, 10, 3)), aes(x)) +
#' geom_histogram(colour = "white", fill = "#88888880", size = 1, bins = 30)
#' geom_histogram(colour = "white", fill = "#88888880", linewidth = 1, bins = 30)
#'
#' means <- (8:1)^3
#' sds <- 10*(8:1)
Expand All @@ -42,7 +42,7 @@
#'
#' p2 <- ggplot(d, aes(x, y)) +
#' geom_boxplot(colour = "white", fill = "#5495CF80", outlier.colour = NA) +
#' geom_point(shape = 21, colour = "white", fill = "#5495CF80", size = 1,
#' geom_point(shape = 21, colour = "white", fill = "#5495CF80", linewidth = 1,
#' position = position_jitter(0.15)) +
#' scale_x_discrete(expand = c(0, 0.02)) + scale_y_continuous(expand = c(0.02, 0)) +
#' theme_void() +
Expand Down
4 changes: 2 additions & 2 deletions R/inset.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ inset_templates <- function(type){
memetheme <- function(base_size = 14, base_family = "", base_col = "white"){
ggplot2::theme_gray(base_size = base_size, base_family = base_family) +
ggplot2::theme(
panel.grid.major = ggplot2::element_line(size = 0.5, colour = "gray"),
panel.grid.major = ggplot2::element_line(linewidth = 0.5, colour = "gray"),
title = ggplot2::element_text(colour = base_col),
axis.text = ggplot2::element_text(colour = base_col),
axis.ticks = ggplot2::element_line(colour = base_col),
axis.line = ggplot2::element_line(size = 1, colour = base_col),
axis.line = ggplot2::element_line(linewidth = 1, colour = base_col),
axis.ticks.length = ggplot2::unit(0.35, "cm"), legend.position = "bottom",
legend.justification = "right", legend.title = ggplot2::element_blank(),
legend.text = ggplot2::element_text(size = base_size), text = ggplot2::element_text(size = 18),
Expand Down
6 changes: 3 additions & 3 deletions R/meme.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
#' "Figure 1. (A) shows a plot and (B) shows another plot.")
#' out <- tempfile("meme", fileext = c("1.png", "2.png", "3.png", "4.gif"))
#'
#' p <- ggplot(d, aes(x, y)) + geom_line(colour = "cornflowerblue", size = 2) +
#' p <- ggplot(d, aes(x, y)) + geom_line(colour = "cornflowerblue", linewidth = 2) +
#' geom_point(colour = "orange", size = 4) + facet_wrap(~grp) +
#' labs(title = txt[1], subtitle = txt[2], caption = txt[3])
#'
Expand Down Expand Up @@ -160,7 +160,7 @@
#' \dontrun{
#' # Not run due to file size, software requirements, web source
#' # GIF meme. Requires magick package.
#' p <- ggplot(d, aes(x, y)) + geom_line(colour = "white", size = 2) +
#' p <- ggplot(d, aes(x, y)) + geom_line(colour = "white", linewidth = 2) +
#' geom_point(colour = "orange", size = 1) + facet_wrap(~grp) +
#' labs(title = "The wiggles", subtitle = "Plots for cats",
#' caption = "Figure 1. Gimme sine waves.")
Expand Down Expand Up @@ -213,7 +213,7 @@ meme <- function(img, label, file, size = 1, family = "Impact", col = "white", s
shadow <- rep(shadow, length.out = n)
}

p0 <- ggplot2::ggplot(data.frame(x = c(0, 1), y = c(0, 1)), ggplot2::aes_string("x", "y")) +
p0 <- ggplot2::ggplot(data.frame(x = c(0, 1), y = c(0, 1)), ggplot2::aes(.data[["x"]], .data[["y"]])) +
ggplot2::annotation_custom(g0, xmin = -Inf, xmax = Inf, ymin = -Inf, ymax = Inf) +
cowplot::theme_nothing()
if(ext2 == "png") Cairo::CairoPNG(file, width = width, height = height, bg = bg)
Expand Down
2 changes: 2 additions & 0 deletions R/memery.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
globalVariables(".data")

#' @name memery
"_PACKAGE"

Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,5 +262,5 @@
},
"SystemRequirements": null
},
"fileSize": "668.854KB"
"fileSize": "125.885KB"
}
65 changes: 34 additions & 31 deletions docs/articles/memery.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pkgdown: 2.1.0
pkgdown_sha: ~
articles:
memery: memery.html
last_built: 2024-09-10T22:16Z
last_built: 2024-09-10T22:38Z
urls:
reference: https://leonawicz.github.io/memery/reference
article: https://leonawicz.github.io/memery/articles
7 changes: 3 additions & 4 deletions docs/reference/car_shiny.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/meme.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CMD
Codecov
Github
ImageMagick
RStudio
Expand Down
Loading

0 comments on commit 495175a

Please sign in to comment.