anyone know how to add some text on the panel ??? for example 2.5, 50 and 1000 are mearsured in Litre, and i want to put the units beside the measurements. How could i do that?
ychu066 wrote: > > NICE!!! thanks > > Deepayan Sarkar wrote: >> >> On Thu, Nov 19, 2009 at 6:03 AM, ychu066 <ychu...@aucklanduni.ac.nz> >> wrote: >>> >>> http://old.nabble.com/file/p26418382/hist1.png hist1.png i want three >>> plots >>> along on the side , how to i do that ? >>> >>> and I also want to change the colour of the bars for each plot, how do >>> i do >>> that ? >>> >>> i got the code here to draw that .. >> >> This code did not produce the plot you have linked to. The answer to >> your question depends on how you created the plot, so you have to tell >> us that. Changing the color in all panels is easy: >> >> histogram(rnorm(100), col = "goldenrod") >> >> Different colors in different panels is a little more work: >> >> histogram(~rnorm(100) | gl(3, 1, 100), >> mycolors = sample(colors(), 3), >> panel = function(..., col, mycolors) { >> panel.histogram(..., col = mycolors[panel.number()]) >> }) >> >> -Deepayan >> >>> columns <- 8:153 >>> plots <- vector("list", length(columns)) >>> j <- 0 >>> for (i in columns) >>> { >>> plots[[ j <- j+1 ]] <- >>> histogram( ~ data[,i], >>> ylab = "Frequency", xlab = "Score", >>> xlim = c(1,5), ylim = c(0,100), >>> main = colnames(data)[i] >>> ) >>> } >>> >>> print(plots[[1]]) >>> >>> # or export >>> >>> for (i in seq_along(plots)) >>> { >>> png(paste("hist", i, ".png", sep = "")) >>> print(plots[[i]]) >>> dev.off() >>> } >>> -- >>> View this message in context: >>> http://old.nabble.com/How-do-I-change-the-colour-and-format-for-the-trelli-plot---tp26418382p26418382.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 >>> and provide commented, minimal, self-contained, reproducible code. >>> >> >> ______________________________________________ >> 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. >> >> > > http://old.nabble.com/file/p26471713/hist1.png hist1.png -- View this message in context: http://old.nabble.com/How-do-I-change-the-colour-and-format-for-the-trelli-plot---tp26418382p26471713.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 and provide commented, minimal, self-contained, reproducible code.