Hi, I am new in R and would like to dot plot my real data points from different categories and put box plot overlapping. To give a feeling of the distribution of my data and the real values. I managed to that in excel but it takes a lot of time and it makes the program crash quite often! http://n4.nabble.com/file/n2134530/Excelversion.jpg I managed to get a box plot and a dot plot of my three categories that look like http://n4.nabble.com/file/n2134530/Rplot_boxplot.jpg http://n4.nabble.com/file/n2134530/Rplot_dotplot.jpg but cannot plot them one on top of the other. Any suggestion would be really apreciated!! I would also like to color only the dots and leave the box plot 'transparent' as in the excel version, tips on that are also welcome! Thanks a lot in advance ADM -- View this message in context: http://r.789695.n4.nabble.com/overlap-dot-plots-with-box-plots-tp2134530p2134530.html Sent from the R help mailing list archive at Nabble.com.
Looks like you're just missing the 'add=TRUE' argument; see below. On 2010-05-07 11:07, ADM wrote:> > Hi, > > I am new in R and would like to dot plot my real data points from different > categories and put box plot overlapping. To give a feeling of the > distribution of my data and the real values. > I managed to that in excel but it takes a lot of time and it makes the > program crash quite often! > http://n4.nabble.com/file/n2134530/Excelversion.jpg > > I managed to get a box plot and a dot plot of my three categories that look > like http://n4.nabble.com/file/n2134530/Rplot_boxplot.jpg > http://n4.nabble.com/file/n2134530/Rplot_dotplot.jpg > > but cannot plot them one on top of the other. Any suggestion would be really > apreciated!! > > I would also like to color only the dots and leave the box plot > 'transparent' as in the excel version, tips on that are also welcome! > > Thanks a lot in advance > > ADMMaybe something like this: boxplot(count ~ spray, data = InsectSprays, outpch = NA) stripchart(count ~ spray, data = InsectSprays, vertical = TRUE, method = "jitter", pch = 21, col = "maroon", bg = "bisque", add = TRUE) (Setting 'outpch = NA' avoids plotting outliers.) -Peter Ehlers
Thanks for the answers, I finally managed! Still need to learn a lot but with such fast help will be easy :) http://n4.nabble.com/file/n2173565/Perfect_one.png Thanks again A -- View this message in context: http://r.789695.n4.nabble.com/overlap-dot-plots-with-box-plots-tp2134530p2173565.html Sent from the R help mailing list archive at Nabble.com.