6

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.

Vidyadhar Rao
  • 333
  • 3
  • 10

1 Answers1

13

Use a cell array of strings as input:

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

each will show on a separate line.

Amro
  • 123,847
  • 25
  • 243
  • 454
  • 2
    you can use a function like [this](http://www.mathworks.com/matlabcentral/fileexchange/9909-line-wrap-a-string) to help you automatically wrap long lines at specified max number of char per line. – Amro Aug 26 '13 at 20:31
  • Thanks you @amro. However, I want to automatically adjust the number of lines to any title (can be a long sentence). – Vidyadhar Rao Aug 26 '13 at 20:31
  • @vidyadhar: see the function I just linked to :) – Amro Aug 26 '13 at 20:39
  • yeah just tried it. That suits for me now. Thanks :) – Vidyadhar Rao Aug 26 '13 at 20:42