我有一個很長的字符串,我想把它作爲描述性文本添加到子圖中。如何在使用`text`繪圖時包裝字符串?
我都想盡一句後增加新的行字符,使其更適合。
subplot(1,2,2);
with_new_lines = regexprep(description, '\.', '\.\n');
text(0.5, 0.5, with_new_lines, 'FontSize', 14', 'FontWeight', 'Bold', ...
'HorizontalAlignment', 'Center', 'VerticalAlignment', 'middle') ;
但它仍然不適合在軸內。
有沒有辦法來動態包裹字符串以滿足次要情節?
http://weknowmemes.com/wp-content/uploads/2013/06/fire-distinguisher.png – gnovice
@gnovice我愛的米姆,但我不認罪;這是一個來自羣衆的數據集[SentencesNYUv2](http://www.cs.toronto.edu/~fidler/projects/sentences3D.html)。 – Cecilia
@Sardar_Usama那不符合動態標準 – Cecilia