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

3 次查看(过去 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
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 中查找有关 Labels and Annotations 的更多信息

产品


版本

R2012b

Community Treasure Hunt

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

Start Hunting!

Translated by