mdthemes icon indicating copy to clipboard operation
mdthemes copied to clipboard

image gallery of mdthemes

Open PythonCoderUnicorn opened this issue 3 years ago • 1 comments

Hello,

I was interested in trying your pkg for curiosity for the md_dark_theme. I normally theme my Rmd with bslib and thematic to avoid white background files & plots. Anyway, i tested out the themes and not all of them work and give errors.

for my test i changed some of the intro code

p <- ggplot(mtcars, aes(hp, mpg),
            fill= am) +
   # had to add color to points as your code returns blank white plots
  geom_point(col="purple", size= 3, alpha= 0.5) +  
  labs(
    title = "This is a **bold** title",
    subtitle = "And an *italics* subtitle",
    x = "**_hp_**",
    caption = "<span style = 'color:red'>A red caption</span>"    # changed color for better readability
  )

p + md_theme_dark()   # +  ggdark::dark_mode() # i added to see what it would look like 

Image Gallery of themes

md_theme_dark

Screen Shot 2021-11-11 at 2 32 30 PM

md_theme_brooklyn99()

Screen Shot 2021-11-11 at 2 34 20 PM

md_theme_avatar()

Screen Shot 2021-11-11 at 2 35 18 PM

theme_calc()

Screen Shot 2021-11-11 at 2 35 51 PM

md_theme_cowplot()

Screen Shot 2021-11-11 at 2 36 26 PM

md_theme_economist()

Screen Shot 2021-11-11 at 2 36 56 PM

md_theme_excel()

Screen Shot 2021-11-11 at 2 37 22 PM

md_theme_excel_new()

Screen Shot 2021-11-11 at 2 37 53 PM

md_theme_fivethirtyeight()

Screen Shot 2021-11-11 at 2 38 19 PM

md_theme_foundation()

Screen Shot 2021-11-11 at 2 38 57 PM

md_theme_gdocs()

Screen Shot 2021-11-11 at 2 39 26 PM

md_theme_hc()

Screen Shot 2021-11-11 at 2 39 52 PM

md_theme_ipsum()

Screen Shot 2021-11-11 at 2 40 20 PM

+md_theme_pander()

Screen Shot 2021-11-11 at 2 40 51 PM

PythonCoderUnicorn avatar Nov 11 '21 21:11 PythonCoderUnicorn

this is for the error messages I get for some themes

in my Rmd (no bslib or thematic running)

p + md_theme_wsj()

returns:

<error/rlang_error>
Only elements of the same class can be merged
Backtrace:
 1. (function (x, ...) ...
 2. ggplot2:::print.ggplot(x)
 4. thematic:::ggplot_build.ggplot(x)
 5. thematic:::resolve_theme_inheritance(p$theme)
 7. ggplot2:::merge_element.element(new = kid_el, old = parent_el)



<error/rlang_error>
Only elements of the same class can be merged
Backtrace:
    █
 1. ├─(function (x, ...) ...
 2. └─ggplot2:::print.ggplot(x)
 3.   ├─ggplot2::ggplot_build(x)
 4.   └─thematic:::ggplot_build.ggplot(x)
 5.     └─thematic:::resolve_theme_inheritance(p$theme)
 6.       ├─ggplot2::merge_element(new = kid_el, old = parent_el)
 7.       └─ggplot2:::merge_element.element(new = kid_el, old = parent_el)

I detached the bslib and thematic and re-ran the code but still same error.

PythonCoderUnicorn avatar Nov 11 '21 21:11 PythonCoderUnicorn