Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

element_marquee makes element disappear #40

Open
alejandrohagan opened this issue Nov 13, 2024 · 0 comments
Open

element_marquee makes element disappear #40

alejandrohagan opened this issue Nov 13, 2024 · 0 comments

Comments

@alejandrohagan
Copy link

Hi,

I'm running the below example and for some reason the element disappears when I use element_marquee. If I use ggplot2::element_text() instead, the element reappears.

To be clear both geom_marquee() and element_marquee() do not work

Any thoughts?

session info is below


library(tidyverse)
library(marquee)




cars <- sub("(\\w+)", "{.red ***\\1***}", rownames(mtcars))


md_text <- 
  "# Lorem Ipsum
Lorem ipsum dolor sit amet, *consectetur* adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna **aliqua**. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo _consequat_. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla ~pariatur~. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

ggplot(mtcars) + aes(disp, mpg,label=cars) + 
  geom_marquee(size = 2) +
  ggtitle(md_text) + 
  theme(plot.title = element_marquee(size = 9))
``` 


![image](https://github.com/user-attachments/assets/a32190df-018e-4cc5-b613-e0acc04f0057)

Session info:
R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] marquee_0.1.0   lubridate_1.9.3 forcats_1.0.0   stringr_1.5.1   dplyr_1.1.4     purrr_1.0.2    
 [7] readr_2.1.5     tidyr_1.3.1     tibble_3.2.1    ggplot2_3.5.1   tidyverse_2.0.0

loaded via a namespace (and not attached):
 [1] gtable_0.3.6      compiler_4.4.0    tidyselect_1.2.1  systemfonts_1.1.0 scales_1.3.0     
 [6] textshaping_0.4.0 R6_2.5.1          labeling_0.4.3    generics_0.1.3    munsell_0.5.1    
[11] pillar_1.9.0      tzdb_0.4.0        rlang_1.1.4       utf8_1.2.4        stringi_1.8.4    
[16] timechange_0.3.0  cli_3.6.3         withr_3.0.2       magrittr_2.0.3    grid_4.4.0       
[21] rstudioapi_0.17.1 hms_1.1.3         lifecycle_1.0.4   vctrs_0.6.5       glue_1.8.0       
[26] farver_2.1.2      fansi_1.0.6       colorspace_2.1-1  tools_4.4.0       pkgconfig_2.0.3  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant