我有下图,我想突出显示两个西瓜的列,因为它的juice_content和重量最高。我知道如何更改列的颜色,但我想突出显示整个列。关于如何实现这一点的任何想法?网上似乎没有任何类似的内容。
fruits <- c("apple","orange","watermelons")
juice_content <- c(10,1,1000)
weight <- c(5,2,2000)
df <- data.frame(fruits,juice_content,weight)
df <- gather(df,compare,measure,juice_content:weight, factor_key=TRUE)
plot <- ggplot(df, aes(fruits,measure, fill=compare)) + geom_bar(stat="identity", position=position_dodge()) + scale_y_log10()
Run Code Online (Sandbox Code Playgroud)