[R] surpressing tickmarks / labels x-as for two sets of boxplot (plotted as stacked boxplots)
twentestat at yahoo.com
Mon Nov 29 12:17:14 CET 2010
I am trying to plot two sets of boxplots together. These are estimates of two
experiments and seven factors.
The results of the two experiments I want to plot as boxplots stacked to each
Therefore I plot first the results of the first experiment; and next with the
add option the second set of boxplots.
The boxplots are plotted at 'at = 1:7 - 0.15 for the first experiment and at=1:7
+ 0.15 for the second.
I surpress plotting the tickmarks and labels succesfully for the first boxplot
But for the second this does not work!
I want to plot the tickmarks and labels at position at=1:7, as below using the
But with this code also tickmarks and labels are plotted at position
boxplot(coefs ~ factor, data = temp,
boxwex = 0.25, at = 1:7 - 0.15,
subset = experiment == "first", col = "red",
xlab = "factor",xaxt="n",
ylab = "individual estimates")
boxplot(coefs ~ factor, data = temp, naxt="n",add = TRUE,
boxwex = 0.25, at = 1:7 + 0.15,
subset = experiment == "second", col = "green")
legend(6,-0.5, c("experiment1", "experiment2"),
fill = c("red", "green"))
Does anyone know how I can surpress these labels for the second boxplot?
Thanks in advance,
More information about the R-help