You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most probaly, the problem has occured after the last updates of ggplot2 package. I used ggplot2 almost daily, but the error started appearing just two days ago (in my case, within ggVennDiagram). A reproducible code with example data and the error is below. ggVennDiagram itself works fine, the problem is geom_sf_label(). Upgrade to R 4.4.0 and re-installation of ggplot2 (now ggplot2_3.5.1) didn't help.
reprex(input = "Example.R")
library(ggVennDiagram)
library(ggplot2)
x = list(A=1:5,B=2:7,C=3:6,D=4:9)
ggVennDiagram(x) +
geom_sf_label(mapping = aes(label = count), data = venn_region(process_data(Venn(x))))
#> Error in geom_sf_label():
#> ! Problem while computing aesthetics.
#> ℹ Error occurred in the 5th layer.
#> Caused by error in .data$X:
#> ! Column X not found in .data.
rlang::last_trace()
<error/rlang_error>
Error in geom_sf_label():
! Problem while computing aesthetics.
ℹ Error occurred in the 5th layer.
Caused by error in .data$X:
! Column X not found in .data.
Hi there, thanks for the report. Can you give a minimal reproducible example using ggplot() and geom_sf_label()? In particular, can we eliminate ggVennDiagram() from this example, to make sure that the problem is with ggplot2 and not the ggVennDiagram package?
Hi, you were right, and the actual problem was ggVennDiagram (ggplot exapmle without ggVennDiagram, but with geom_sf_label(), was OK). I found out that ggVennDiagram package has been also substantially remastered just recently, and stopped accepting geom_sf_label() function... Today I found and tried their new tutorial and got normal venn plots, as before. So, thanks a lot for the fast reply and your time!
I'm not sure how applicable this is, but when imposing new layers on a pre-existing plot where you don't have control over aesthetics etc, it might be best to use inherit.aes = FALSE to not mix up the aesthetics.
As the problem appears to be related to ggVennDiagram, I think it is safe to close here.
Most probaly, the problem has occured after the last updates of ggplot2 package. I used ggplot2 almost daily, but the error started appearing just two days ago (in my case, within ggVennDiagram). A reproducible code with example data and the error is below. ggVennDiagram itself works fine, the problem is geom_sf_label(). Upgrade to R 4.4.0 and re-installation of ggplot2 (now ggplot2_3.5.1) didn't help.
reprex(input = "Example.R")
library(ggVennDiagram)
library(ggplot2)
x = list(A=1:5,B=2:7,C=3:6,D=4:9)
ggVennDiagram(x) +
geom_sf_label(mapping = aes(label = count), data = venn_region(process_data(Venn(x))))
#> Error in
geom_sf_label()
:#> ! Problem while computing aesthetics.
#> ℹ Error occurred in the 5th layer.
#> Caused by error in
.data$X
:#> ! Column
X
not found in.data
.rlang::last_trace()
<error/rlang_error>
Error in
geom_sf_label()
:! Problem while computing aesthetics.
ℹ Error occurred in the 5th layer.
Caused by error in
.data$X
:! Column
X
not found in.data
.Backtrace:
▆
<fn>
(x)$.rlang_data_pronoun
(.data, X)The text was updated successfully, but these errors were encountered: