Closed ndsubison2178 closed 5 years ago
This example
library(emojifont) dd=data.frame(x=emoji(c("satisfied", "disapointed")), y=c(50, 10)) emoji_text=element_text(family="OpenSansEmoji", size=20) ggplot(dd, aes(x, y)) + geom_bar(stat='identity', aes(fill=x)) + ggtitle(paste(emoji(c("+1", "-1")), collapse=" "))+ theme(axis.text.x = emoji_text, legend.text=emoji_text, title=emoji_text) + xlab(NULL)+ylab(NULL)
Works in regular r or rstudio desktop
When I take this to rMarkdown it does not work. I am using the rmarkdown template https://raw.githubusercontent.com/GuangchuangYu/emojifont/master/vignettes/emojifont.Rmd
and calling ```{r fig.showtext=TRUE}
you need to do :
load.emojifont("OpenSansEmoji.ttf")
before ggplot.
ggplot
This example
Works in regular r or rstudio desktop
When I take this to rMarkdown it does not work. I am using the rmarkdown template https://raw.githubusercontent.com/GuangchuangYu/emojifont/master/vignettes/emojifont.Rmd
and calling ```{r fig.showtext=TRUE}