Ellen, Is this what you are looking for?
library(HH) sed <- read.table(textConnection(" sed_depth FT value 0-1 1A 35.16591742 1-2 1A 36.21447839 2-3 1A 19.09701388 3-4 1A 35.86953345 4-10 1A 30.04823571 0-1 1B 15.02829003 1-2 1B 19.15637318 2-3 1B 12.45405429 3-4 1B 25.23130364 4-10 1B 22.94187026 0-1 2A 47.58423315 1-2 2A 38.36871661 2-3 2A 44.3824086 3-4 2A 31.24740697 4-10 2A 29.81555036 0-1 2B 2.221559394 1-2 2B 6.260431823 2-3 2B 24.06652322 3-4 2B 7.651755935 4-10 2B 17.19434367 "), header=TRUE) closeAllConnections() sed2 <- matrix(sed$value, 4, 5, dimnames=list(sed$FT[c(1,6,11,16)], sed$sed_depth[1:5]), byrow=TRUE) sed3 <- cbind(sed2[4:1, 5:1], '1'=0, '2'=0, '3'=0, '4'=0, '5'=0) result <- plot.likert(sed3, horizontal=FALSE) result$legend$bottom$args$text <- result$legend$bottom$args$text[1:5] result$legend$bottom$args$rect$col <- result$legend$bottom$args$rect$col[1:5] result$legend$bottom$args$columns=5 result If yes, please write me off-list and we can tinker with the appearance. Rich On Fri, Dec 30, 2011 at 10:04 AM, elpape <ellen.p...@gmail.com> wrote: > Dear all, > > I would like to create a vertically stacked area chart in R. The data are > presented in the attached text file. > I would like to see the trend in values for the different groups with > sediment depth (that's why I would like to create a vertically stacked > chart; normally sed_depth should be = x, but I want it plotted on the > y-axis). In the packages available to create stacked area plots, there > seems > to be an option for horizontally stacked area plots only. Does anybody know > how I should adjust the code for creating the graph that I want? > > http://r.789695.n4.nabble.com/file/n4245931/FT_GB0806.txt FT_GB0806.txt > > I hope this message is clear! Thanks for the help! > > Ellen > > -- > View this message in context: > http://r.789695.n4.nabble.com/vertically-stacked-area-plot-tp4245931p4245931.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.