Re: [R] Struggling trying to plot points on boxplot

2016-06-02 Thread Thomas Adams
Bill, Thank you!! With some tweaking, this approach was exactly what I needed. Previously, I had been using bxp and had my code for it, but my data was structured completely differently from what I have now. I figured something like groupedX <- with(d, split(x, group)) existed, but how to find it?

Re: [R] Struggling trying to plot points on boxplot

2016-06-02 Thread William Dunlap via R-help
Does using zz<-bxp(boxplot(data,plot=FALSE)) do what you want? E.g., d <- transform(data.frame(t=1:15), x = sin(t)+log2(t), group = paste("Group", t%/%4)) groupedX <- with(d, split(x, group)) zz <- bxp(boxplot(groupedX, plot=FALSE)) # bxp returns the x positions of the boxes points(col="blue", pc

Re: [R] Struggling trying to plot points on boxplot

2016-06-02 Thread RICHARD M. HEIBERGER
something like this points(zz[1:length(obs$value)], obs$value,lty=3,lwd=1,col="red",pch=19) Sent from my iPhone > On Jun 2, 2016, at 11:36, Thomas Adams wrote: > > points(zz, obs$value,lty=3,lwd=1,col="red",pch=19) __ R-help@r-project.org mailing li

Re: [R] Struggling trying to plot points on boxplot

2016-06-02 Thread Sarah Goslee
boxplot() turns the x variable into a factor, if it isn't already, so the x axis is calibrated as seq_len(nvalues). Whatever you're trying to do with using your boxplot object as the x variable in points won't work: zz is a list of length 6. There's an example in ?boxplot of adding points to a box

[R] Struggling trying to plot points on boxplot

2016-06-02 Thread Thomas Adams
Hello all: I've been beating my head on this for over a day and I have done a lot of Google'ing with no luck. I have generated a 'time-series' of boxplots (227), covering more than a 30-day period at 6-hour intervals, which summarize an ensemble forecast. What I want to do is over-plot the observ