Skip to content

Commit

Permalink
solved #105
Browse files Browse the repository at this point in the history
  • Loading branch information
GuangchuangYu committed Aug 20, 2020
1 parent 6b16c34 commit 38b14fd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: hexSticker
Title: Create Hexagon Sticker in R
Version: 0.4.7
Version: 0.4.8
Authors@R: c(person(given = "Guangchuang", family = "Yu", email = "guangchuangyu@gmail.com", role = c("aut", "cre")),
person(given = "Laurent", family = "Gatto", email = "lg390@cam.ac.uk", role = "ctb"),
person(given = "Johannes", family = "Rainer", email = "johannes.rainer@eurac.edu", role = "ctb"),
Expand All @@ -27,5 +27,5 @@ URL: https://github.com/GuangchuangYu/hexSticker
BugReports: https://github.com/GuangchuangYu/hexSticker/issues
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.0
RoxygenNote: 7.1.1
Roxygen: list(markdown = TRUE)
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# CHANGES IN VERSION 0.4.8

+ support passing `expression()` as package name (via the `package` parameter) (2020-08-20, Thu)
- <https://github.com/GuangchuangYu/hexSticker/issues/105>

# CHANGES IN VERSION 0.4.7

+ use Cairo and enable Antialias when saving sticker on Windows (2020-06-01, Mon)
Expand Down
13 changes: 9 additions & 4 deletions R/sticker.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,15 @@ spotlight <- function(alpha) {
##' @author Guangchuang Yu
geom_pkgname <- function(package, x=1, y=1.4, color="#FFFFFF", family="Aller_Rg", size=8, ...) {
family <- load_font(family)
d <- data.frame(x = x, y = y,
label = package)
geom_text(aes_(x=~x, y=~y, label=~label), d,
size=size, color=color, family = family, ...)
## d <- data.frame(x = x, y = y,
## label = package)
## geom_text(aes_(x=~x, y=~y, label=~label), d,
## size=size, color=color, family = family, ...)


## https://github.com/GuangchuangYu/hexSticker/issues/105
ggplot2::annotate("text", x = x, y = y, size = size,
label = package, color = color, family = family, ...)
}

##' @importFrom sysfonts font_add
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ sticker(p, package="hexSticker", p_size=22, s_x=1, s_y=.75, s_width=1.3, s_heigh
[<img src="https://raw.githubusercontent.com/MEDSL/resources/master/images/ggmedsl.png" height="120"/>](https://github.com/MEDSL/ggmedsl)
[<img src="https://github.com/muschellij2/glassdoor/raw/master/sticker.png" height="120"/>](https://github.com/muschellij2/glassdoor)
[<img src="https://github.com/greta-dev/greta/raw/master/logos/greta_hex.png" height="120"/>](https://github.com/greta-dev/greta/tree/master/logos)
[<img src="https://raw.githubusercontent.com/calvinmfloyd/grobblR/master/man/figures/logo.png" height="120"/>](https://github.com/calvinmfloyd/grobblR)
[<img src="https://raw.githubusercontent.com/mikemahoney218/heddlr/master/man/figures/heddlr-badge.png" height="120"/>](https://github.com/mikemahoney218/heddlr)
[<img src="https://raw.githubusercontent.com/SteffenMoritz/imputeR/master/man/figures/imputeR-logo.png" height="120"/>](https://github.com/SteffenMoritz/imputeR)
[<img src="https://github.com/lpantano/isomiRs/raw/master/inst/stickers/isomirs.png" height="120"/>](https://github.com/lpantano/isomiRs)
Expand Down

0 comments on commit 38b14fd

Please sign in to comment.