[R] Gap between plots, how to reduce

Rui Barradas ru|pb@rr@d@@ @end|ng |rom @@po@pt
Tue Sep 13 07:08:31 CEST 2022


Hello,

I may be wrong but if you do not change boxwex the deafual boxwex=0.8 is 
used and the white space is reduced.
And if you increase the value, for instance to boxwex = 0.9, the white 
space is even smaller.

Is this what you want?

Hope this helps,

Rui Barradas

Às 05:58 de 13/09/2022, Neha gupta escreveu:
> Hi
> 
> There is a gap between plots (white spaces) when I draw the boxplot. I want
> to reduce the spaces between the plots so that the boxplot takes a small
> space. When I just adjust "boxwex" values, the length of individual plots
> increases/decreases but the white spaces is still there.
> 
> My code:
> 
> RF= c(100,100,100,33.3,100,100)
> Ranger= c(66.6, 100, 100, 33.3, 100, 81.8)
> SVM= c(81.8, 100, 100, 66.6, 81.8, 81.8)
> KNN= c(33.3, 25, 53.8, 25, 11.1, 5.2)
> DT= c(100, 100, 100, 25, 100, 100)
> 
> mean(DT)
> 
> colors = rep("green",6)
> at.x <- seq(1,by=.4, length.out = 10)
> boxplot(RF,Ranger, SVM, KNN, DT, range = 0, boxwex=0.4,col=colors, names=
> c("RF","Ranger", "SVM", "KNN", "DT"),main="Consistent features with 10-fold
> vs LOO ")
> 
> 	[[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