I am using code below to creat a n*1 plot:
figure1 = figure('PaperSize',[8 8]);
for i=1:N
f = subplot(N,1,i);
plot(X,Y, 'Color','k');
end
I would like to add an annotation/text to the center left of the figure, vertically.
I am using the following code to do so:
xlim = get(gca,'XLim');
ylim=get(gca,'YLim');
ht = text(xlim(1)+0.95*xlim(2),0.5*ylim(1)+0.5*ylim(2),'Absorbance [a.u.]');
set(ht,'Rotation',90);
However, the gca is getting the xlim and ylim of the last subplot, not the whole figure. Any suggestion to do so?
Following is what I want to achieve.
Best Answer