3

I am running the examples at this link. After re-installing ggiraph, the same code that was working before, returns this error

Error:
! Problem while converting geom to grob.
ℹ Error occurred in the 1st layer.
Caused by error in `check.length()`:
! 'gpar' element 'lwd' must not be length 0
Run `rlang::last_error()` to see where the error occurred.

Any suggestion?

Phil
  • 7,287
  • 3
  • 36
  • 66
giulia
  • 63
  • 1
  • 6

3 Answers3

1

I had a similar problem when using geom_freqpoly in ggplot. There seemed to be a problem with xlim(). When I removed xlim() everything worked fine. Restaring RStudio solved the problem for me. R version 4.2.2 ggplot2_3.4.0

0

Which version of ggplot2 are you using? I was having trouble with an identical error from ggforce. In the end I got everything working with R 4.2.2, ggplot2 3.4.0, ggiraph 0.8.4 and ggforce 0.4.1.

NickE
  • 16
0

Using st_zm(shapefile) should sove the problem.

TWest
  • 765
  • 2
  • 6
  • 27