How to separate plot titles on single line? [solved]
9 views (last 30 days)
Show older comments
figure()
plot (time,BrACOM)
%xlim ([tmin tmax])
xlabel('Time [s]');
ylabel('Acc [g]');
legend('x','y','z');
title([head neck helmet impact energy rep]);
I would like the variables to be spaced on the plot title, like:head neck helmet impact energy rep and not headneckhelmetimpactenergyrep
Solution:
title([head ' ' neck ' ' helmet ' ' impact ' ' energy]);
0 Comments
Accepted Answer
More Answers (2)
Alan Stevens
on 4 Jul 2021
Define the titles with an extra space at the end of each word.
0 Comments
Les Beckham
on 4 Jul 2021
Try this:
title(sprintf('%s %s %s %s %s %s', head, neck, helmet, impact, energy, rep);
0 Comments
See Also
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!