2
我問這個沒有找到可以嘗試的東西,因爲我沒有找到相同的東西。我爲此道歉。在條形圖下顯示數值表
從this條形圖:
df <- structure(list(year = 2002:2005, work = c(1L, 2L, 3L, 2L), confid = c(8L,
5L, 0L, 6L), jrs = c(0L, 3L, 4L, 5L)), .Names = c("year", "work",
"confid", "jrs"), class = "data.frame", row.names = c(NA, -4L
))
library(ggplot2)
library(reshape)
md <- melt(df, id=(c("year")))
temp.plot <- ggplot(data=md, aes(x=year, y=value, fill=variable)) +
geom_bar(stat="identity")+
theme(axis.text.x=element_text(angle=90))+
ggtitle("Score Distribtion")
temp.plot
我想問一下,如果是有使用GGPLOT2有每年下的值,因爲它是在barplot爲每個變量什麼簡單的辦法。 這裏是一個虛擬示例輸出: