Skip to content
Prev 385787 / 398503 Next

package plotrix: how to account for two two z categories

Hi Luigi,
To display a nested breakdown like this I would suggest barNest. This
is one way to display the nesting. Note that if you change the order
of the factors in the formula you will get a different plot, so think
about how you want the summaries nested. Error bars can only be
displayed on the final breakdown.

# because you have fairly long labels, use a wide plot
x11(width=10)
barcol<-list("lightgray",c("#ff00ff","#ff99ff"),
 c("#00ff00","#66ff66"),c("#aaaa00","#888800"))
barNest(y~x+z+w,Q,main="Double Measurement",
 ylab="Response",col=barcol,errbars=TRUE)

Jim

On Wed, Sep 23, 2020 at 10:48 PM Luigi Marongiu
<marongiu.luigi at gmail.com> wrote: