%% Add Text Box with Multiple Lines to Graph
% Insert multiple lines in a text box by creating a cell array of strings. Each element is used as a separate line.

figure
plot(1:10)
str = {'Straight Line', 'Plot of 1 to 10'};
annotation('textbox', [0.2,0.4,0.1,0.1],...
           'String', str)

% Copyright 2015 The MathWorks, Inc.