Legend outside plot matlab. Learn more about plotting MATLAB.