Note that, the functions scale_color_continuous() and scale_fill_continuous() can be used also to set gradient colors. Gradient between n colors # Scatter plot # Color points by the mpg variable sp3<-ggplot(mtcars, aes(x=wt, y=mpg, color=mpg)) + geom_point() sp3 # Gradient between...
ggplot(ToothGrowth, aes(x=dose, y=len)) +geom_boxplot() # scatter plot ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point() Use a single color 使用单一的颜色 # box plot ggplot(ToothGrowth, aes(x=dose, y=len)) + geom_boxplot(fill='#A4A4A4', color="darkred") # scatter plot gg...
When I add “col = status” it adds the legend but with dark grey colour inside. Any help would be appreciated? The code I am using is: p1 <- ggplot(d1, aes(x= reorder(gene, -fold_change), y= fold_change, fill = status, color = status)) + geom_bar(position = position_...