필터 지우기
필터 지우기

Chinese characters in axis title, label or legend in R2012b (or earlier) possible or not possible?

조회 수: 6 (최근 30일)
I am running Matlab R2012b English edition on a Windows 10 PC. I am not able to incorporate Chinese characters in any of the text objects belonging to a graph, be it axis labels, title, legend or text. On the other hand, it is possible to display Chinese characters in text strings belonging to UI control objects such as a push button if I prior to that set the character encoding to UTF-8 using
feature('defaultcharacterset','UTF-8')
But that has no effect on text objects belonging to axes. When I try for instance title('垂直'), it just gives a bunch of nonsense ASCII characters. So my question is simply, is there a way using this release of Matlab? It is not possible for us to use a later version of Matlab since this is a deployed commercial software distributed worldwide.

채택된 답변

Fredrik Gustavsson
Fredrik Gustavsson 2022년 4월 1일
I will answer myself - yes it is possible. Instead of
feature('defaultcharacterset','UTF-8')
use
feature('defaultcharacterset','GBK')
and change the system locale language in Windows to Chinese (this will not change your Windows desktop language so don't worry in case you don't read Chinese). Perhaps there is a neat way to change the system locale language from Matlab but my attempts to do it did not work.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2012b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by