Re: [R] Combine colors and shading lines

2008-06-21 Thread jim holtman
You can play around with something like this to control the plots and to add color to them: data(HairEyeColor) a <- as.table( apply(HairEyeColor, c(1,2), sum) ) a1<-a[1:2,] library(lattice) library(reshape) x <- melt(a1) p1 <- barchart(value ~ Eye, group=Hair, data=x) p2 <- barchart(value ~ Hai

Re: [R] Combine colors and shading lines

2008-06-20 Thread Josh Roofchop
I tried the "add=TRUE" but get "Warning messages: 1: parameter "add" could not be set in high-level plot() function" Josh HBaize wrote: > > > Josh, > Check into "add=TRUE" :-) > > All you need to do is insert "add=TRUE" to the second > chart to superimpose it on the first chart. You might

[R] Combine colors and shading lines

2008-06-20 Thread Josh Roofchop
Hi, basically I am trying to create a grouped bar graph with each group a different color and a bar in each group to have shading lines. Basically combine the 2 graphs created below. Thanks, Josh data(HairEyeColor) a <- as.table( apply(HairEyeColor, c(1,2), sum) ) a1<-a[1:2,] par(mfcol=c(1,2),

Re: [R] Combine colors and shading lines

2008-06-20 Thread HBaize
Well perhaps we can take the mystery of why it work for me, but not you, off line :-) I'm using R 2.6.1 on a WinXP platform. You could try just using shades of color like this: data(HairEyeColor) a <- as.table( apply(HairEyeColor, c(1,2), sum) ) a1<-a[1:2,] barplot(a1, type="n",

Re: [R] Combine colors and shading lines

2008-06-20 Thread HBaize
Josh, Check into "add=TRUE" :-) All you need to do is insert "add=TRUE" to the second chart to superimpose it on the first chart. You might also consider making the second bar a different shade of color rather than using shadding lines, then it would only be one plot. data(HairEyeColor) a