Error with ggplot2 3.4.0
Opened this issue · 0 comments
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 of
element_rect()is deprecated as of ggplot2 3.4.0. ℹ Please use the
linewidth` 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:
▆
- ├─ggplot2::ggsave(out_file, p, width = 8, height = height)
- │ ├─grid::grid.draw(plot)
- │ └─ggplot2:::grid.draw.ggplot(plot)
- │ ├─base::print(x)
- │ └─ggplot2:::print.ggplot(x)
- │ ├─ggplot2::ggplot_gtable(data)
- │ └─ggplot2:::ggplot_gtable.ggplot_built(data)
- │ └─ggplot2:::by_layer(...)
- │ ├─rlang::try_fetch(...)
- │ │ ├─base::tryCatch(...)
- │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
- │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
- │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
- │ │ └─base::withCallingHandlers(...)
- │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
- │ └─l$draw_geom(d, layout)
- │ └─ggplot2 (local) draw_geom(..., self = self)
- │ └─self$geom$draw_layer(...)
- │ └─ggplot2 (local) draw_layer(..., self = self)
- │ └─base::lapply(...)
- │ └─ggplot2 (local) FUN(X[[i]], ...)
- │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params))
- │ └─self$draw_panel(...)
- │ └─ggtree (local) draw_panel(...)
- │ ├─grid::segmentsGrob(...)
- │ │ └─grid::grob(...)
- │ └─grid::gpar(...)
- │ └─grid:::validGP(list(...))
- │ └─grid (local) numnotnull("lwd")
- │ └─grid (local) check.length(gparname)
- │ └─base::stop(...)
- └─base::.handleSimpleError(...)
- └─rlang (local) h(simpleError(msg, call))
-
└─handlers[[1L]](cnd)
-
└─cli::cli_abort(...)
-
└─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