Skip to content

Error with ggplot2 3.4.0 #2

@teacakedeadlift

Description

@teacakedeadlift

Hi

Great tool. Thanks.

FYI trying to run this on a mac locally I had some issues. It failed with the following error:

Start running cnetml 51.79 real 51.36 user 0.17 sys Finish running cnetml Warning message: The sizeargument ofelement_rect()is deprecated as of ggplot2 3.4.0. ℹ Please use thelinewidth` argument instead.
plot title

Plotting the tree in inputdir//MaxL-m3-o1-s2-cons0-estmu0-combined.txt
Error in geom_segment2():
! Problem while converting geom to grob.
ℹ Error occurred in the 3rd layer.
Caused by error in check.length():
! 'gpar' element 'lwd' must not be length 0
Backtrace:

  1. ├─ggplot2::ggsave(out_file, p, width = 8, height = height)
  2. │ ├─grid::grid.draw(plot)
  3. │ └─ggplot2:::grid.draw.ggplot(plot)
  4. │ ├─base::print(x)
  5. │ └─ggplot2:::print.ggplot(x)
  6. │ ├─ggplot2::ggplot_gtable(data)
  7. │ └─ggplot2:::ggplot_gtable.ggplot_built(data)
  8. │ └─ggplot2:::by_layer(...)
  9. │ ├─rlang::try_fetch(...)
  10. │ │ ├─base::tryCatch(...)
  11. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  12. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  13. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
  14. │ │ └─base::withCallingHandlers(...)
  15. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
  16. │ └─l$draw_geom(d, layout)
  17. │ └─ggplot2 (local) draw_geom(..., self = self)
  18. │ └─self$geom$draw_layer(...)
  19. │ └─ggplot2 (local) draw_layer(..., self = self)
  20. │ └─base::lapply(...)
  21. │ └─ggplot2 (local) FUN(X[[i]], ...)
  22. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params))
  23. │ └─self$draw_panel(...)
  24. │ └─ggtree (local) draw_panel(...)
  25. │ ├─grid::segmentsGrob(...)
  26. │ │ └─grid::grob(...)
  27. │ └─grid::gpar(...)
  28. │ └─grid:::validGP(list(...))
  29. │ └─grid (local) numnotnull("lwd")
  30. │ └─grid (local) check.length(gparname)
  31. │ └─base::stop(...)
  32. └─base::.handleSimpleError(...)
  33. └─rlang (local) h(simpleError(msg, call))
  34. └─handlers[[1L]](cnd)
    
  35.   └─cli::cli_abort(...)
    
  36.     └─rlang::abort(...)
    

Execution halted
`

I had to install a mamba virtual environment with ggplot2 3.3.0 to get it to work. Assume it's due to lwd in gpar?

Thanks

Phil

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions