10
我想爲它的每個部分顯示100%欄的值。不幸的是我不知道該怎麼做。由於圖例的位置,圖形應該位於格子中(我使用ggplot2進行了嘗試,但無法在一行中顯示圖例)。我對任何建議或想法感到高興。在堆疊的格子條形圖中顯示值
library(lattice)
data(postdoc, package = "latticeExtra")
colnames(postdoc) <- c("Legendtext 1", "2", "3", "4", "5")
colorset <- simpleTheme(col = c(rgb(166,27,30,maxColorValue = 255),
rgb(192,80,77,maxColorValue = 255),
rgb(24,65,83,maxColorValue = 255),
rgb(60,143,167,maxColorValue = 255),
rgb(130,184,208,maxColorValue = 255)),
border = "white")
pl <- barchart(prop.table(postdoc, margin = 1),
par.settings = colorset,
auto.key = list(columns = 5, space = "bottom",
cex = 0.8, size = 1.4, between = 0.2,
between.columns = 0.1, adj = 1))
非常感謝您!這對我來說是一個很大的幫助! – SebastianW 2010-07-12 18:39:51