I'm quite new in R, but I'm trying to do a facet_grid
using ggplot
package in R and, for better data visualization, I'd like to insert the percentage of values in each quadrant for the column groupings
, like the image below:
Can be one or another, in each quadrant or in legend.
My code is this one below
ggplot(df1_final,aes(x=revenue,y=visits,col=groupings)) +
geom_jitter(alpha=I(1/2)) +
xlim(c(0,20000)) +
facet_grid(group_lvl_1_visits ~ group_lvl_1_revenue)
Could anyone help me on this?
EDIT: Both solutions helped me a lot, very good ones.