scale_fill_distiller(palette = "RdBu",direction = 1) ggsave("3_vennplot.jpg",width = 5, height = 4) ##'@2维 ggVennDiagram(x[1:2],label = "count", label_alpha = 0)+ scale_fill_distiller(palette = "Set3",direction = 1) ggsave("2_vennplot.jpg",width = 5, height = 4) 更...
p <- ggplot(data = KEGG_top20, aes(x = Count, y = pathway, fill = -log10(pvalue)))+ geom_bar(stat = "identity", width = 0.8) + scale_fill_distiller(palette = "RdPu",direction = 1) + labs(x = "Number of Gene", y = "pathway", title = "KEGG enrichment barplot") + t...
ggplot(aes(map_id = 地区)) + geom_map(aes(fill = 百分比变动), map = world) + scale_fill_distiller(palette ="Set2",direction=1) + expand_limits(x = world$long, y = world$lat) + xlab("经度") + ylab("纬度") 这里做的并不像之前的图那么优雅,因为这个图的数据复杂一些。map_data(...
7. geom_point(shape = 21, colour = "black", aes(fill = value), size=5, stroke=1) + 8. scale_x_continuous(limits = c(1880,2017)) + 9. scale_y_continuous(limits = c(-0.5,1)) + 10. scale_fill_distiller(palette = "RdYlBu", limits = c(-1,1), guide = FALSE) + 11. xl...
geom_sf_label(data = venn_region(df),aes(label=id),fontface="bold")+ scale_fill_distiller(palette = 5)+ theme_void() 1. 2. 3. 4. 5. 6. 7. 是不是很神奇,不过还是封装好的画图函数的更好用的一点。 而且,不太容易找到好看的颜色搭配。
使用scale_fill_distiller()函数添加颜色 颜色的选择 ## 查看全部主题颜色,或是自己设置RColorBrewer::display.brewer.all() 例子3: ggVennDiagram(x[1:2],label="both")+scale_fill_distiller(palette="Spectral",direction=1) 3.3 线条的选择,使用edge_lty =进行寻找,默认是实线,虚线参数为dashed。
scale_x_continuous(limits = c(1880,2017)) + scale_y_continuous(limits = c(-0.5,1)) + scale_fill_distiller(palette = "RdYlBu", limits = c(-1,1), guide = FALSE) + xlab("") + ylab("Difference from 1900-2000 (ºC)") + ...
b+ scale_fill_brewer(palette = "Blues")也可以用scale_fill_grey()函数使用灰度,通过start end 两个参数指定,0为黑,1为白,都在0-1范围内 b + scale_fill_grey()b + scale_fill_grey(start=1, end=)连续型变量 gradient 创建渐变色 distiller使用ColorBrewer的颜色 identity 使用color变量对应的颜色,...
scale_fill_distiller(palette = "RdYlBu", limits = c(-1,1), guide = FALSE) + xlab("") + ylab("Difference from 1900-2000 (ºC)") + theme_minimal(base_size = 16, base_family = "Georgia") 结果应该是: 该文件包含字段和,后者是全球年平均气温,相比于1900-2000的平均水平。
+ scale_fill_distiller(palette ='RdYlGn',direction =1) 4.3 RFM直方图: #RFM直方图 p1 <- ggplot(salesRFM,aes(Recency)) + geom_histogram(bins =10,fill ='#362D4C') p2 <- ggplot(salesRFM,aes(Frequency)) + geom_histogram(bins =10,fill ='#362D4C') ...