Hello everyone
How could you add a certain polygon as a background in a ggtree object. For example, I built a phenogram with:
p1 <-ggtree (tree_phenogram, aes (color = trait), continuous = TRUE, yscale = "trait") + scale_color_viridis_c () + theme_minimal () + ylim (-1.5,0.6)
and as a background, I would like to add a polygon constructed in this way, which represents the 95% CI for the ancestral estimates of the trait
p2 <-ggplot () + geom_polygon (data = data_plot_interval, aes (x = xvals, y = yvals), fill = "gray50") + xlab ("Time") + ylab ("trait") + scale_x_reverse ()
Best regards
I attach a picture of the two charts separately
ps. note that time axis are not in the same order