Hello Ilai, Thank you for the response. It did help a lot.
However, a beginner to lattice has three questions. Q1 Please kindly explain why "in this case OP is using it with no "at" argument,"" so it is possible to display the median and the outliers with different pch? Q2. what is the relationship between package "HH" and graphic-drawing? I checked ??HH and found little explanation on its function of graphic-drawing. Q3 Please kindly advise how to make outliers empty circle (pch=2) in this case as the code below. Thank you. code Diet.colors <- c("forestgreen","darkgreen","chocolate1","darkorange2","sienna2", "red2","firebrick3","saddlebrown","coral4","chocolate4","darkblue","navy","grey38") levels(dataN$Diet_B) <- diet.code bwplot(MS_midpoint_lat~Diet_B, data=dataN, xlab=list("Diet of Breeding Ground", cex = 1.4), ylab = list("Latitudinal Midpoint Breeding Ground ",cex = 1.4), lwd=1.5, cex.lab=1.4, cex.axis=1.2, font.axis=2, cex=1.5, las=1, panel=panel.bwplot.intermediate.hh, bty="l", col=Diet.colors, pch=rep("l",13), scales=list(x=list(rot=90)), par.settings=list(plot.symbol = list(pch = 2, cex = 2),box.umbrella=list(lty=1))) Elaine On Sat, Sep 29, 2012 at 2:44 AM, ilai <ke...@math.montana.edu> wrote: > On Fri, Sep 28, 2012 at 6:57 AM, Richard M. Heiberger <r...@temple.edu>wrote: > >> Elaine, >> >> For panel.bwplot you see that the central dot and the outlier dots are >> controlled by >> the same pch argument. > > > ??? I don't think so... > > bwplot(rgamma(20,.1,1)~gl(2,10), pch=rep(17,2), > panel = lattice::panel.bwplot) > > I think you mean panel.bwplot.intermidiate.hh ? > > BTW thank you for the useful HH package but in this case OP is using it > with no "at" argument, so why not > > Diet.colors <- c("forestgreen", "darkgreen","chocolate1","darkorange2", > "sienna2","red2","firebrick3","saddlebrown","coral4","chocolate4","darkblue","navy","grey38") > bwplot(rgamma(20*13,1,.1)~gl(13,20), > fill = Diet.colors, pch = "|", > par.settings = list(box.umbrella=list(lty=1))) > > cheers > > > > I initially set the pch="|" to match your first >> example with the horizontal >> indicator for the median. I would be inclined to use the default circle >> for the outliers and >> therefore also for the median. >> >> Rich >> >> On Fri, Sep 28, 2012 at 7:13 AM, Sarah Goslee <sarah.gos...@gmail.com >> >wrote: >> >> > I would guess that if you find the bit that says pch="|" and change it >> to >> > pch=1 it will solve your question, and that reading ?par will tell you >> why. >> > >> > Sarah >> > >> > On Thursday, September 27, 2012, Elaine Kuo wrote: >> > >> > > Hello >> > > >> > > This is Elaine. >> > > >> > > I am using package lattice to generate boxplots. >> > > Using Richard's code, the display was almost perfect except the >> outlier >> > > shape. >> > > Based on the following code, the outliers are vertical lines. >> > > However, I want the outliers to be empty circles. >> > > Please kindly help how to modify the code to change the outlier >> shapes. >> > > Thank you. >> > > >> > > code >> > > package (lattice) >> > > >> > > dataN <- data.frame(GE_distance=rnorm(260), >> > > >> > > Diet_B=factor(rep(1:13, each=20))) >> > > >> > > Diet.colors <- c("forestgreen", >> "darkgreen","chocolate1","darkorange2", >> > > >> > > "sienna2","red2","firebrick3","saddlebrown","coral4", >> > > >> > > "chocolate4","darkblue","navy","grey38") >> > > >> > > levels(dataN$Diet_B) <- Diet.colors >> > > >> > > bwplot(GE_distance ~ Diet_B, data=dataN, >> > > >> > > xlab=list("Diet of Breeding Ground", cex = 1.4), >> > > >> > > ylab = list( >> > > >> > > "Distance between Centers of B and NB Range (1000 km)", >> > > >> > > cex = 1.4), >> > > >> > > panel=panel.bwplot.intermediate.hh, >> > > >> > > col=Diet.colors, >> > > >> > > pch=rep("|",13), >> > > >> > > scales=list(x=list(rot=90)), >> > > >> > > par.settings=list(box.umbrella=list(lty=1))) >> > > >> > > [[alternative HTML version deleted]] >> > > >> > > ______________________________________________ >> > > R-help@r-project.org <javascript:;> 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. >> > > >> > >> > >> > -- >> > Sarah Goslee >> > http://www.stringpage.com >> > http://www.sarahgoslee.com >> > http://www.functionaldiversity.org >> > >> > [[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. >> > >> >> [[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. >> > > [[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.