I have created a code to make a scatter plot combined with a density plot. For several samples, I have set a boundary at some value. The scatter plot (geom_point) does not plot on the left-hand side of the boundary, whereas the density plot (stat_density2d) does plot on the left-hand side of the boundary. How do I override or remove that part (i.e. the shading/alpha on the left-hand side of the boundary, between 1x10E1 and 1x10E2 on the x-axis) of the plot?
Thanks a lot!
visual <- ggplot(data=samples, aes(GRNHLin, REDHLin)) + geom_point(colour='dodgerblue3', size=0.375) +
stat_density_2d(aes(alpha = ..density..), geom = 'tile', contour = FALSE) +
scale_x_log10(breaks = trans_breaks("log10", function(x) 10^x),
labels = trans_format("log10", math_format(10^.x)), limits = c(1,1e4)) +
scale_y_log10(breaks = trans_breaks("log10", function(x) 10^x),
labels = trans_format("log10", math_format(10^.x)), limits = c(1,1e3)) +
geom_vline(xintercept=40) +
labs(x="Green Fluorescence", y="Red Fluorescence")
visual