How can I remove Korean or other language text from plots such as Bolinger, hpfileter etc.?

4 views (last 30 days)
When I followed to run examples in function documentation like hpfilter and bollinger, there are Korean characters (non-latin characters set) displayed in a figure as below captured image. I am wondering why Korean characters are shown even though the MATLAB desktop language is English. 

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 2 Feb 2023
Edited: MathWorks Support Team on 2 Feb 2023
A MATLAB installed for Chinese, Japanese, or Korean normally localizes text in the desktop to your language, and localizes display of dates and times when you use the datetime data type.
As a result, charts that involve dates or time will show localized timestamps.
For example,
d = datetime();
data = datetime('now')-years(19):years(1):datetime('now');
You can override localization of text in the desktop using the desktop language preference, but this has no effect on localization for display of datetimes. Therefore, even when your desktop show English text, a chart may show localized time stamps.
To control datetime localization, use the datetime command window display locale preference.
For example,
On the Home tab, in the Environment section, click Preferences. Select MATLAB > Command Window, and then, in the Datetime format section, change the Locale to en_US from ko_KR.
This ensures that timestamps in a chart or in the command window are always localized to that preference.
Or you can use simply the following code for tick labels.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!