Too many non-property/value arguments error occurred when applying a text box to a figure
조회 수: 11 (최근 30일)
이전 댓글 표시
Here is the line:
text(2,3,'\bf fontname{times} infty','FontSize',12,'center')
댓글 수: 0
채택된 답변
Walter Roberson
2019년 9월 6일
'center' is not an option by itself. You want either 'HorizontalAlignment', 'center' or 'VerticalAlignment', 'center'
Also you appear to be missing \ before fontname and before infty: '\bf \fontname{times} \infty'
댓글 수: 2
Walter Roberson
2019년 9월 6일
text(2, 3, '\bf\fontname{times}\infty','horizontalalignment', 'center', 'fontsize', 12)
That is, those two spaces you had in your control string were being output as spaces.
\ signals to the (default) tex interpreter that the next few characters are a command or special character . For example 'beta \beta' would output ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/237253/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/237253/image.png)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!