
Problem with Ylim using FEX: addaxis
Posted:
Jul 12, 2013 12:54 PM


Does anyone have a solution to this. FEX:addaxis works really nicely for me, but I can't seem to get the Y limits to change. The example code below illustrates the problem.
Example code:
x = 1:10; y = x.^2; figure(1) plot(x,y) [hplts,hax2] = addaxis(x,zeros(size(y)),'linewidth',1.5); % the line is at 0 figure(2) plot(x,y) [hplts,hax2] = addaxis(x,zeros(size(y)),'linewidth',1.5); set(hax2,'Ylim',[0 10]); % the line is now at 5

