[R] caption needed for boxplot

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Thu Mar 5 22:07:00 CET 2020


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 using gmail.com> wrote:
>
> 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")
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.



More information about the R-help mailing list