File Exchange

image thumbnail

Boxplot rotate labels, change fontsize

version 1.0 (1.61 KB) by

This script shows how to rotate labels and change their fontsize with boxplots



View License

I had so much problems with the labels in boxplots. After working on it quite a long time, I hope it might help somebody out there to save time. This demo script shows how to:
1) Rotate Labels
2) Change Fontsize of Labels
3) Change the position of each boxplot in the figure in order to group them.

Comments and Ratings (10)


J O (view profile)

Using Matlab 2016a the code for rotating the X-axis tick labels didn't work for me. rather I found this code to work for rotating the X-axis tick labels by 15 degrees:

set( get( findobj( gca,'Type','hggroup') ,'Parent' ),'XTickLabelRotation',15 )

Code on!

Edward Byers

Good, thanks


Malte (view profile)

Another nice tool to overcome the disgusting plot tools of MATLAB.

Very helpful! A great submission.

Thank you so much, I am drowning in data and this is huge help


You rock! This saved me hours of fiddling. Thank you!

Laurent S

Laurent S (view profile)

Thank you, this saved me the time needed to hack the solution myself. The examples are clear and straight forward.

MATLAB Release
MATLAB 7.7 (R2008b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today