R ggplot geom_hex alpha transparency
I have tried to plot some log scale data with geom_hex() but I have a problem with alpha transparency setting. plot script; p <- ggplot(data =test,aes(x=f.log, y=d.log)) + geom_hex(aes(alpha=log(..count..)),fill="#000000")+ geom_hline(yintercept = 0, size = 0.5,color="red",linetype = 2) + geom_vline(xintercept = 0, size = 0.5,color="red",linetype = 2) + theme_bw() for log scale label correction; p +scale_y_continuous(labels =(math_format(10^.x)))+ scale_x_continuous(labels =(math_format(10^.x))) test data plot; Q1: How can I fix the legend label and scales? I used "alpha=log(..count..)",