library(ggplot2)
library(ggridges)
library(RColorBrewer)
ggplot(lincoln_weather, aes(x = `Mean Temperature [F]`, y = `Month`, fill = ..density..)) +
geom_density_ridges_gradient(scale = 3, rel_min_height = 0.00,size = 0.3) +
scale_fill_gradientn(colours = colorRampPalette(rev(brewer.pal(11,'Paired')))(32))
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/7b1bd0daec8c49e25cf0df95436212af.png)
library(reshape2)
colormap <- colorRampPalette(rev(brewer.pal(11,'Paired')))(32)
dt<-lincoln_weather[,c("Month","Mean Temperature [F]")]
splitdata<-split(dt,dt$Month)
xmax<-max(dt$`Mean Temperature [F]`)*1.1
xmin<-min(dt$`Mean