Closed strengejacke closed 5 years ago
very curious, the error happens in plot.see_rope:
x %>%
as.data.frame() %>%
ggplot(aes(
x = .data$x,
y = .data$y,
height = .data$height,
group = .data$y,
fill = .data$fill
)) +
ggridges::geom_ridgeline_gradient() +
annotate(
"rect",
xmin = attributes(x)$info$rope_range[1],
xmax = attributes(x)$info$rope_range[2],
ymin = 0,
ymax = Inf,
fill = rope_color,
alpha = rope_alpha
) +
add_plot_attributes(x)
Basically, the error appears if we swap the annotation layer with the geom_ridgeline_gradient... (I wanted to put the rectangle behind the data as you mentioned)
ok, let's revert the change and put the rectangle above the data.
Yes I did it, but still though, that's weird!
Not sure why this now happens, but when I run
I get an error:
The y-value for the plot-data is not numeric, but
"Posterior"
. I think the source of the error is somewhere here: https://github.com/easystats/see/blob/master/R/plot.hdi.R#L10@DominiqueMakowski any ideas?