Does MATLAB support High DPI screens on Linux?

535 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2018 年 6 月 22 日
編集済み: MathWorks Support Team 2024 年 9 月 30 日
I am running MATLAB on Linux on a high resolution 4K display. The menus, menu bar, etc are very small and the characters are difficult to read because of their small size. I have already changed the font size in the editor and command window, but I cannot find any way of changing the MATLAB program menu bar size. 

採用された回答

MathWorks Support Team
MathWorks Support Team 2024 年 9 月 30 日
編集済み: MathWorks Support Team 2024 年 9 月 30 日
MATLAB supports High DPI screens on Linux starting from R2017b.
Tuning a high-DPI Linux system requires two steps:
  1. Setting the MATLAB scale factor. 
  2. Calibrating the system's DPI
The MATLAB scale factor affects MATLAB desktop and the size/position of windows.
The system DPI determines the scale and font size of axes and labels.
The two tuning steps are described below: 
STEP 1: To set the MATLAB scale factor, please execute the following commands in the MATLAB Command Window:
>> s = settings;
>> s.matlab.desktop.DisplayScaleFactor
>> s.matlab.desktop.DisplayScaleFactor.PersonalValue = 1.5
Here the scale factor has been set to 1.5.
STEP 2: To calibrate the system's DPI to match the scale factor, please use the following terminal commands:
% xdpyinfo | grep resolution
resolution: 96x96 dots per inch
% xrandr --dpi 144
The DPI value chosen should be the resolution found with "xdpyinfo" multiplied by the MATLAB scale factor that was set. In the example, 96 × 1.5 = 144.
MATLAB must be restarted after Step 2. 
Note:
In earlier releases than R2017b, high DPI screens on Linux is not supported. 
The possible workarounds mentioned below may help improve the visual appearance:
(a) You can increase font sizes of text in the different windows. However, the icon or font size of the toolbar cannot be changed.
(b) You can switch the high DPI monitor to a lower screen resolution, for example 1920x1080 or as preferred. 
(c) You can connect a lower resolution monitor and use MATLAB on that monitor.
  3 件のコメント
DNF
DNF 2020 年 8 月 3 日
What is the effect of the xrandr command? Will it affect other things than Matlab itself? It doesn't seem Matlab-specific, so as a new linux user I'm a bit cautious about it.
Andrew King
Andrew King 2021 年 1 月 22 日
Solution 1 fixed most things. But scrollbars, as well as icons in "save as..." dialog, etc. are still tiny.
Weirdly, in the code tip box, the text is tiny, the "details" button is normal, and the "fix" button is tiny.
Any ideas on completing the fix would be appreciated. Using 2020b on Ubuntu 20.04.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by