Share the Gallery !Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone


Boxplot is an R function that represents a numeric vector of data that is split in several groups.

It can be usefull to specify a feature for each group. In this exemple, the number of vlues within each group is represented. Another utility could be to add the significance of a statistical test.

The trick is to use the text function, that permits to add text wherever in a R plot. For this function, you have to give

– a vector with the x-axis positions of the labels you want to add. In our case, it will be 1,2,3…until the number of groups you have.

-a vector with the y axis positions. In our case, we have to take the maximum of the value of each plot. These values are given in the $stats attribute of your boxplot.

-a vector with the labels : the number of value per group or whatsoever.




Not much what you are looking for ?

3D abline add aggregate animation arrows at axis barplot basics beside bg border boxplot boxwex breaks bty cex cex.axis circular plot cmdscale col color Colors cor cut d3.js dataArt dendrogram density dist factor font ggplot2 hclust hist Histograms horiz hsv ifelse Igraph image ImageMagick Important ! inset jitter labels las lattice layout leafletR legend legend.text levelplot levels library lines lm lty lwd main map Maps mar mfrow mfrox mgp Miscellaneous model mtext mtxt names nlevels oma order package par paste PCA pch pie plot plotly points polygon predict pt.cex pty R radarchart rect reorder rgb rgl Ring scatterplot segments stacked-area table tag_ tag_for_slider testnumber1 text tick Time series title toto tutu type VennDiagram violin-plot width wordcloud xaxt xlab xlim xyplot yaxt ylab ylim zetag

You can search a media by theme with the tag cloud above.


Leave a Reply

Be the First to Comment!

Notify of