フィルターのクリア

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 Center および File Exchange2-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