%% Create Title and Subtitle
% Create a plot. Then create a title and a subtitle by calling the title function with two character vectors as arguments. Use the 'Color' name-value pair argument to customize the color for both lines of text. Specify two return arguments to store the text objects for the title and subtitle.

plot([0 1])
[t,s] = title('Straight Line','Slope = 1, y-Intercept = 0',...
    'Color','blue');

%
% Change the font size for the title to 16, and change the font angle for the subtitle to 'italic'.

t.FontSize = 16;
s.FontAngle = 'italic';

% Copyright 2020 The MathWorks, Inc.