5

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.

Mushi
  • 367
  • 2
  • 4
  • 14
  • You can create only one `ylabel` (say, for the first subplot) and then use [this related question](http://stackoverflow.com/questions/10634923/align-the-ylabel-in-subplots) to align it. – Eitan T Sep 23 '13 at 13:33
  • @EitanT: I tried to use 'position' property of label to position it in the middle of the y-axis of all subplots but it seems fixed. Can you suggest me the coordinate of the 'position' property for a '2 row' subplot. Many thanks. – Mushi Sep 23 '13 at 13:42
  • 1
    I have done it for me with the same 'position' property. It was just the matter of adjusting the position according to the label ticks. Thanks for your help. – Mushi Sep 23 '13 at 13:49

1 Answers1

4

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)
Alceu Costa
  • 9,733
  • 19
  • 65
  • 83
m_power
  • 3,156
  • 5
  • 33
  • 54