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

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

Open
matthlfu opened this issue Mar 7, 2024 · 2 comments
Labels
potential-bug Bug report filled by the user

Comments

@matthlfu
Copy link

matthlfu commented Mar 7, 2024

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"

@matthlfu matthlfu added the potential-bug Bug report filled by the user label Mar 7, 2024
@krassowski
Copy link
Owner

Could it be related to #195?

@matthlfu
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential-bug Bug report filled by the user
Projects
None yet
Development

No branches or pull requests

2 participants