Write code to
- Get the axis width (ha.Position), and fontsize (ha.Title.FontSize) in pixels (where ha is the handle to the axis of interest)
- If you use fixed width font then it's easy to break the line with something like:
(have not debugged it...)
an even better way is to search backwards for the first space before your YourWidthValue...
Is it not a bit strange that matlab cannot provide this functionallity built in?