Open dkori opened 1 year ago
Try adding library(ragg)
to your app and redeploying
Try adding
library(ragg)
to your app and redeploying
Tried this, now I'm seeing empty rectangles instead of the ones with numbers in them, but still not the correct symbols.
Session info on shinyapps.io after adding ragg:
2022-12-16T05:13:07.414539+00:00 shinyapps[7889593]: R version 4.1.2 (2021-11-01)
2022-12-16T05:13:07.414563+00:00 shinyapps[7889593]: Platform: x86_64-pc-linux-gnu (64-bit)
2022-12-16T05:13:07.414568+00:00 shinyapps[7889593]: Running under: Ubuntu 20.04.5 LTS
2022-12-16T05:13:07.414576+00:00 shinyapps[7889593]: Matrix products: default
2022-12-16T05:13:07.414581+00:00 shinyapps[7889593]: BLAS: /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
2022-12-16T05:13:07.414587+00:00 shinyapps[7889593]: LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3
2022-12-16T05:13:07.414605+00:00 shinyapps[7889593]: locale:
2022-12-16T05:13:07.414608+00:00 shinyapps[7889593]: [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
2022-12-16T05:13:07.414611+00:00 shinyapps[7889593]: [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
2022-12-16T05:13:07.414614+00:00 shinyapps[7889593]: [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
2022-12-16T05:13:07.414648+00:00 shinyapps[7889593]: [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
2022-12-16T05:13:07.414689+00:00 shinyapps[7889593]: attached base packages:
2022-12-16T05:13:07.414694+00:00 shinyapps[7889593]: [1] stats graphics grDevices utils datasets methods base
2022-12-16T05:13:07.414723+00:00 shinyapps[7889593]: other attached packages:
2022-12-16T05:13:07.414759+00:00 shinyapps[7889593]: [1] ragg_1.2.1 ggplot2_3.3.5 tidyr_1.2.1 shiny_1.7.3
2022-12-16T05:13:07.414785+00:00 shinyapps[7889593]: loaded via a namespace (and not attached):
2022-12-16T05:13:07.415025+00:00 shinyapps[7889593]: [1] Rcpp_1.0.8 pillar_1.8.1 compiler_4.1.2 later_1.3.0
2022-12-16T05:13:07.415036+00:00 shinyapps[7889593]: [5] tools_4.1.2 digest_0.6.30 lifecycle_1.0.3 tibble_3.1.8
2022-12-16T05:13:07.415061+00:00 shinyapps[7889593]: [9] gtable_0.3.0 pkgconfig_2.0.3 rlang_1.0.6 cli_3.4.1
2022-12-16T05:13:07.415067+00:00 shinyapps[7889593]: [13] fastmap_1.1.0 withr_2.5.0 dplyr_1.0.10 generics_0.1.3
2022-12-16T05:13:07.415093+00:00 shinyapps[7889593]: [17] vctrs_0.5.0 systemfonts_1.0.4 grid_4.1.2 tidyselect_1.2.0
2022-12-16T05:13:07.415100+00:00 shinyapps[7889593]: [21] glue_1.6.2 R6_2.5.1 textshaping_0.3.6 fansi_1.0.3
2022-12-16T05:13:07.415124+00:00 shinyapps[7889593]: [25] purrr_0.3.5 magrittr_2.0.3 scales_1.1.1 promises_1.2.0.1
2022-12-16T05:13:07.415135+00:00 shinyapps[7889593]: [29] ellipsis_0.3.2 htmltools_0.5.3 mime_0.12 xtable_1.8-4
2022-12-16T05:13:07.415147+00:00 shinyapps[7889593]: [33] colorspace_2.0-2 httpuv_1.6.6 utf8_1.2.2 munsell_0.5.0
2022-12-16T05:13:07.460982+00:00 shinyapps[7889593]: Listening on http://127.0.0.1:40591
System details
Browser Version:
Output of
sessionInfo()
when run locally):Session info when running on shinyapps.io:
Output of SessionInfo() when run in docker container:
Example application or steps to reproduce the problem
Code that displays correctly when run on my local machine, but fails when run on shinyapps.io or from a docker container ```R library(shiny) library(tidyr) library(ggplot2) print(sessionInfo()) ui<-fluidPage(plotOutput("plot"), plotOutput("plot2")) server <- function(input, output, session) { df<-data.frame(x=0:10, y=0:10) # plot using unicode symbols as shapes output$plot<-renderPlot({ df%>% ggplot()+ geom_point(aes(x=x,y=y),shape="\U0001F37C",size=20)+ scale_shape_manual(values="\U0001F37C")+ labs(title="using geom_point shapes") }) # plot using built in ggplot shapes output$plot2<-renderPlot({ df%>% ggplot()+ geom_text(aes(x=x,y=y),label="\U0001F37C",size=20, family = "Lucida Sans Unicode")+ labs(title="using geom_text with font specified in family") }) } shinyApp(ui, server) ``` Example dockerfile for building the app that's also failing: ``` # get shiny server and R from the rocker project FROM rocker/shiny-verse RUN apt-get update && apt-get install -y \ libcurl4-gnutls-dev \ libssl-dev RUN apt-get install -y locales locales-all ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 RUN R -e 'install.packages(c(\ "shiny", \ "tidyr", \ "ggplot2"\ ))' # copy all files into a directory called app COPY . /app CMD ["R", "-e", "shiny::runApp('/app', host = '0.0.0.0', port = 5050)"] ``` ### Describe the problem in detail The code example above runs and displays fine when I run the shinyapp on my local machine, but the unicode shapes do not display in the plot either when I deploy the app to shinyapps.io, or when I build the app into a docker container and run it from the container. I believe unicode display issues usually have to do with the font so I tried specifying a font in geom_text, but it still doesn't work. How it looks in browser when I run the app locally: ![working_local](https://user-images.githubusercontent.com/10734057/208014540-a5147eac-1390-41bd-bd2a-aa5bcbae9ce4.png) How it looks when I run the app on shinyapps.io and open the link in the same browser: ![failing_shinyio](https://user-images.githubusercontent.com/10734057/208015693-4f8019e2-619e-4186-a304-62eee9ae7715.png) When I containerize the app with docker, the display looks the same as it does on shinyapps.io (square icons instead of the correct icons) if I import from `rocker/shiny`, and it doesn't display any icons at all if I import from `rocker/shiny-verse`. I'm sorry if this isn't the right place to post this issue, I'm at a total loss as to what the issue could be so I wasn't sure if I should create this with rocker, ggplot, here, or somewhere else.