one ylabel for all subplots matlab

12,485

Here something that could help you:

MyBox = uicontrol('style','text');
set(MyBox,'String','Your YLabel')
set(MyBox,'Position',[0,0,10,10])

You can add other properties to rotate it and change the background color.

Edit:

Well i didn't find any ways of doing the rotation with the uicontrol. The other option is to use the text command :

%your subplot
h = axes('Position',[0 0 1 1],'Visible','off'); %add an axes on the left side of your subplots
set(gcf,'CurrentAxes',h)
text(.1,.45,'Your YLABEL',...
'VerticalAlignment','bottom',...
'HorizontalAlignment','left', 'Rotation', 90, 'FontSize',18)
Share:
12,485
Mushi
Author by

Mushi

Updated on June 17, 2022

Comments

  • Mushi
    Mushi almost 2 years

    How can set a 'big, single' ylabel for multiple subplot figure in matlab?

    I tried to search but only found a similar question with 'matplotlib' not with matlab.

    Thanks in advance.