Skip to content

caption needed for boxplot

3 messages · Neha gupta, Jim Lemon

#
Hi
I have a boxplot using the following code and I get the boxplots, but at
the x axis, instead of 1,2,3, how can I get my own captions like , random,
grid, genetic, pso etc.

a=ran_CV$results$MAE
aa=grid_CV$results$MAE
b=ran_boot$results$MAE
bb=grid_boot$results$MAE
c=ran_locv$results$MAE
cc=grid_locv$results$MAE
e=ran_5CV$results$MAE
dd=grid_5CV$results$MAE

boxplot(a,aa,b,bb,c,cc,e,dd, col="Green")
#
Hi Neha,
Have a look at the "names" argument to boxplot. Something like this:

boxplot(a,aa,b,bb,c,cc,e,dd, col="Green",
 names=c("ab","cd","ef","gh","lm","pq","xy","yz") )

Jim
On Fri, Mar 6, 2020 at 7:07 AM Neha gupta <neha.bologna90 at gmail.com> wrote:
#
Hi Jim, thanks for your feedback

It works fine now.

Best regards
On Thu, Mar 5, 2020 at 10:07 PM Jim Lemon <drjimlemon at gmail.com> wrote: