如果把时间转为离散的分类型,再看看:,并没有画出6来
ggplot(BOD, aes(x = factor(Time), y = demand)) + geom_bar(stat = "identity")
看看如何给条形图上色...:运用fill=" ",我们发现,fill是填充色,colour是边框色,(这里colour是英式英语颜色的写法,等价于美式英语color)
ggplot(pg_mean, aes(x = group,...那我们只需要再添加一个图层就可以啦,这时可用
scale_fill_brewer(palette = "Pastel1") 方便记忆palette的英文意思是调色板,面板的意思.这里便是用的叫Pastel1的色板...Berkeley" & Year >= 1900) #选取Source == "Berkeley" & Year >= 1900的数据
csub$pos = 0 #创建...,堆叠条形图
ggplot(cabbage_exp, aes(x = Date, y = Weight, fill = Cultivar)) + geom_bar(stat = "identity")