Add legend outside of axes without rescaling in MATLAB
https://stackoverflow.com/questions/3602571/add-legend-outside-of-axes-without-rescaling-in-matlab
WebAug 30, 2010 · hAx2 = axes('Position',[0.05 0.4 0.7 0.2]); plot(hAx2, x,y) hAx3 = axes('Position',[0.05 0.75 0.7 0.2]); plot(hAx3, x,y) %# add legend to middle one. h = legend(hAx2, 'sin(x)'); pos = get(h,'position'); set(h, 'position',[0.8 0.5 pos(3:4)]) edited Aug 30, 2010 at 17:36. answered Aug 30, 2010 at 17:12.
DA: 19 PA: 82 MOZ Rank: 64