krassowski/complex-upset

Error "The `axis.text.theta` theme element is not defined in the element hierarchy."

matthlfu opened this issue · 2 comments

Hi there,

I'm trying to get a Upset-Plot using the first example given on github. Unfortunately, I get the following error message:

Error in mapply():
! The axis.text.theta theme element is not defined in the element hierarchy.
Run rlang::last_trace() to see where the error occurred.

rlang::last_trace()
<error/rlang_error>
Error in mapply():
! The axis.text.theta theme element is not defined in the element hierarchy.


Backtrace:

  1. ├─base (local) <fn>(x)
  2. └─patchwork:::print.patchwork(x)
  3. └─patchwork:::build_patchwork(plot, plot$layout$guides %||% "auto")
  4. └─base::lapply(x$plots, plot_table, guides = guides)
    
  5.   ├─patchwork (local) FUN(X[[i]], ...)
    
  6.   └─patchwork:::plot_table.ggplot(X[[i]], ...)
    
  7.     └─ggplot2::ggplotGrob(x)
    
  8.       ├─ggplot2::ggplot_gtable(ggplot_build(x))
    
  9.       └─ggplot2:::ggplot_gtable.ggplot_built(ggplot_build(x))
    
  10.         └─ggplot2:::plot_theme(plot)
    
  11.           └─base::mapply(validate_element, theme, names(theme), MoreArgs = list(element_tree = get_element_tree()))
    

Run rlang::last_trace(drop = FALSE) to see 3 hidden frames.

Here's the code:

`library(ComplexUpset)
library/ggplot2)

movies = ggplot2movies::movies
movies[movies$mpaa == '', 'mpaa'] = NA
movies = movies[complete.cases(movies), ]

movies = as.data.frame(ggplot2movies::movies)
head(movies, 3)

genres = colnames(movies)[18:24]
genres

movies[genres] = movies[genres] == 1
t(head(movies[genres], 3))

upset(movies, genres, name='genre', width_ratio=0.1)`

ComplexUpset version: > ‘1.3.3’

R.Version()
$platform
[1] "x86_64-w64-mingw32"

$arch
[1] "x86_64"

$os
[1] "mingw32"

$crt
[1] "ucrt"

$system
[1] "x86_64, mingw32"

$status
[1] ""

$major
[1] "4"

$minor
[1] "3.2"

$year
[1] "2023"

$month
[1] "10"

$day
[1] "31"

$svn rev
[1] "85441"

$language
[1] "R"

$version.string
[1] "R version 4.3.2 (2023-10-31 ucrt)"

$nickname
[1] "Eye Holes"

Could it be related to #195?

Yes, updating to the newest ggplot2-package solved the problem, thanks!