How to do tiledlayout for Boxplots?

S
sunny02 · Jul 2, 2020 · 2.1K views
Question
I am trying to do a tiledlayout for MATLAB boxplots. My code is:   tiledlayout('flow'); boxplot(randn(10,5)); nexttile; boxplot(randn(10,5)+5); nexttile; boxplot(randn(10,5)-6); nexttile; boxplot(randn(10,5)); But I always get the below warnings Warning: Unable to set 'Position', 'InnerPosition', 'OuterPosition', or 'ActivePositionProperty' for objects in a TiledChartLayout > In boxplot>renderLabels/setLabelappdata (line 3012) In boxplot>renderLabels (line 2913) In boxplot (line 407)
Expert Answer
Profile picture of Prashant Kumar
Prashant Kumar PhD Expert
Answered Aug 24, 2026

The boxplot function sets the position of axes (If the axes are not UI axes -> line 3012) and according to the warning, it can not be set for tiled layout. This might be the reason for the warning. If you do not want the warning to show up, you may use

 

warning('MATLAB:handle_graphics:Layout:NoPositionSetInTiledChartLayout','off')

And for all the plots to be shown, use nexttile before first plot. Refer this example.

tiledlayout('flow');
nexttile;
boxplot(randn(10,5));
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!