![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1652221/image.png)
Multiple ylabels for tiledlayout
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Suppose I am drawing a 4*6 figure with tiledlayout. Now I want to let the first and the second rows of figures share the same ylabel, and so do the third and the fourth rows. I looked for solutions but found nothing useful. I tried to create two different tiledlayout on one figure, but it turns out that tiledlayout function does not allow this. Thus, is there any suggestions?
0 Kommentare
Antworten (1)
Matt J
am 26 Mär. 2024
Bearbeitet: Matt J
am 26 Mär. 2024
One approach would be to create a 2x1 tiledlayout where inside each tile you nest another tiledlayout of dimension 2x6. You can facilitate this by downloading nestedLayouts() from the File Exchange,
Example:
[ax,t,T]=nestedLayouts([2,1],[2,6]);
for i=1:numel(ax) %populate all 24 axes with plot data
plot(ax(i),rand(1,5));
end
for i=1:numel(t) %Give each outer tile its own ylabel
ylabel(t(i),"ylabel No. "+i);
end
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1652221/image.png)
Siehe auch
Kategorien
Mehr zu Axis Labels finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!