Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to split title into multiple lines in matlab plots [duplicate]

I have multiple images displaying in matlab plot along with titles as textual descriptions. Some of the titles are long and are overlapping with adjacent images. So, how could i automatically adjust the titles by splitting them into multiple lines.

like image 708
Vidyadhar Rao Avatar asked Aug 26 '13 20:08

Vidyadhar Rao


People also ask

How do you repeat a plot in MATLAB?

If you use 'hold on', you should then be able to plot on the same figure, then simply use the 'hold off' function when you're done plotting on the same graph.

How do you plot multiple lines on a graph in MATLAB?

Plot Multiple Lines By default, MATLAB clears the figure before each plotting command. Use the figure command to open a new figure window. You can plot multiple lines using the hold on command. Until you use hold off or close the window, all plots appear in the current figure window.


1 Answers

Use a cell array of strings as input:

title({'hello','world'})

each will show on a separate line.

like image 75
Amro Avatar answered Sep 22 '22 00:09

Amro