I don't think you can do so, at least not while using title. Title is not designed to set distinct colors for each line. Instead, it creates ONE object. For example, lets look more deeply into what happens.
plot(rand(1,10))
title({'FAS of NS';'Select the low filter limit'});
So now extract the title.
H = get(gca,'Title')
H =
Text (FAS of NS, Select the low filter limit) with properties:
String: {2×1 cell}
FontSize: 11
FontWeight: 'bold'
FontName: 'Helvetica'
Color: [0 0 0]
HorizontalAlignment: 'center'
Position: [5.50000575500699 1.00721574344023 0]
Units: 'data'
Show all properties
H.String
ans =
2×1 cell array
{'FAS of NS' }
{'Select the low filter limit'}
H.Color
ans =
0 0 0
As you can see, it is one element of that plot. It has one color, here, black. And while I can change the color from black to red or blue or anything, I cannot split the lines to have distinct colors. At this point the issue is in the graphics code, not in title.
You would instead need to create the title as two distinct text objects in that figure window, located at vertically adjacent positions. Then you could specify their own colors to be as you desire. Or, I suppose you could call title once with one line of the title. Then, by extracting the location of the title, create a second text object in the window, but at a slightly higher position, offset as a function of the chosen fontsize.
H.Units = 'pixels'
H =
Text (FAS of NS, Select the low filter limit) with properties:
String: {2×1 cell}
FontSize: 11
FontWeight: 'bold'
FontName: 'Helvetica'
Color: [0 0 0]
HorizontalAlignment: 'center'
Position: [218.000277519226 346.7499994321 0]
Units: 'pixels'
As you see, now you can extract the pixel coordinates of the title location. This information would allow you to carefully place a second line of text just above the first, offset in pixels.
Only you know if it is worth the effort to set two colors in the title. Not really that difficult though.
Best Answer