https://blog.csdn.net/woodcorpse/article/details/106554057
library(viridis)
library(ggridges)
head(lincoln_weather[ ,1:4])
ggplot(lincoln_weather, aes(x=`Mean Temperature [F]`, y=`Month`, fill=..x..))+
geom_density_ridges_gradient(scale=3, rel_min_height=0.01, gradient_lwd = 1.)+
scale_x_continuous(expand = c(0.01, 0))+ # 扩展下横轴和纵轴
scale_y_discrete(expand = c(0.01,0))+
scale_fill_viridis(name="Temp. [F]", option = "C")+
labs(title="Temperature in Lincoln NE",
subtitle="Mean temperature (Fahrenheit) by month for 2016\nData:Orogin CSV from the Weather Underground ")+
theme_ridges(font_size = 13, grid = FALSE)+
theme(axis.title.y = element_blank())
head(diamonds)
ggplot(diamonds, aes(x=price, y=cut, fill=cut))+
geom_density_ridges(scale=4)+
# scale_fill_cyclical(values = c("blue", "green"))+
theme_ridges(grid = FALSE)
https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tbWJpei5xcGljLmNuL21tYml6X3BuZy9CQThDV2hIUVdQek9zWXZ2VmljRVJLaWNpYUdlREdzSG9uVWZKTGRwdGgxWE9GTUxkUVZNVDJtTWwwMVFXbXNxazNiN3Ztd2ljY01lY1ZLMWtvUDhoSHZnY0EvNjQw?x-oss-process=image/format,png
|
请发表评论