[英]How to reproduce this chart series in R
我想在R中重現此圖表系列:
如果我不帶包裝嘗試:
hist(hist1, col="pink",breaks=100, main=NULL,border = 0)
hist(hist2, col="orange",breaks=100, main=NULL,border = 0)
hist(hist3, col="green",breaks=100, main=NULL,border = 0)
[...]
hist(hist10, col="red",breaks=100, main=NULL,border = 0)
設計真的不一樣! 有什么建議么 ?
順便說一句,如果有人知道如何向其應用相同的灰色網格?
如評論中所述,這是使用ggplot2
軟件包ggplot2
。 這是一個示例(從?geom_histogram
修改而來):
library(ggplot2)
ggplot(movies, aes(x = rating)) +
geom_histogram(binwidth = 0.5, aes(fill = factor(Comedy))) +
facet_grid(Comedy~.)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.