How to color all bars with gr

Dear All, i would like to fill all bars with gradient color between red and white

image

g <- ggplot(data.frame(x = letters[1:3], y = c(10, 20, 30)), aes(x, y))
g + geom_bar(stat = "identity")


Hello,

Although it is possible to generate gradients in a bar chart (see this post), what you are trying to do here doesn't make much sense from the visualisation / data science perspective as the colour itself should carry meaning and in your case it's purely decorative (the top of each bar is red regardless of its height, bearing to correlation with values).

Hope this helps,
PJ