one ylabel for all subplots matlab

Mushi picture Mushi · Sep 23, 2013 · Viewed 12.3k times · Source

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.

Answer

m_power picture m_power · Sep 23, 2013

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)