MATLAB create title over one column of subplot
15,768
You can use text
to label the columns and rows.
subplot(2,2,1)
title('a')
h1 = text(-0.25, 0.5,'row 1');
set(h1, 'rotation', 90)
text(0.35,1.2,'column 1');
subplot(2,2,2)
title('b')
text(0.35,1.2,'column 2');
subplot(2,2,3)
title('c')
h = text(-0.25, 0.5, 'row 2');
set(h, 'rotation', 90)
subplot(2,2,4)
title('d')
The position of text will have to be adjusted based on the x and y range of your plots.
Author by
dustynrobots
Updated on June 05, 2022Comments
-
dustynrobots almost 2 years
So I have a 3x3 array of subplots. I know how to get a title on each one of them, and I know how to get a "super title" using the suptitle function over the whole thing, but I can't figure out how to get titles to only show up over each column. I also want to do a similar thing with the rows. Think hip, knee, ankle across the top, then angular velocity, torque, and power down the left side. Thoughts?