Matlab with HiDPI... is still an issue on Linux(?)

Hi,
I wonder if there is a solution for the small interface issue that Matlab has on HiDPI screen under Linux. It is becoming a real messy working intensively, especially with AppDesigner that suffers also because you cannot change the font size in the editor.
Thanks for the help.
Fabio

 Réponse acceptée

MathWorks suggested the following procedure, which works well for me (R2017b). Quoting from their email:
Tuning a high-DPI Linux system requires two steps
  • Setting the MATLAB scale factor
  • 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. To set the MATLAB scale factor, please use the following MATLAB commands:
>> s = settings;s.matlab.desktop.DisplayScaleFactor
>> s.matlab.desktop.DisplayScaleFactor.PersonalValue = 1.5
To calibrate the system DPI to match the scale facto, 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.

11 commentaires

This worked flawlessly in R2017b. Im using Gnome 3 with Wayland.
Thanks. It works !
l4d3
l4d3 le 23 Jan 2018
Thanks! I used PersonalValue = 2. Fits in with the rest of KDE at x2 scale.
Mark
Mark le 23 Fév 2018
Do you actually need the xrandr command? It seemed to work for me on Gnome and Wayland without it?
Xing He
Xing He le 1 Juin 2018
Works well for Matlab 2017b on Ubuntu 16.04! I only used the first commands for matlab. No calibration for system. Thanks!
Rian Hughes
Rian Hughes le 11 Juil 2018
Works Like a charm! I used a personal factor of 2.5, but it's all personal preference. Thanks! :)
Ben Zhang
Ben Zhang le 2 Mar 2020
This worked well for MATLAB, but Simulink still has the same issue. Any idea on how to resolve that?
Hi,
I think I have tried:
>> s = settings;s.matlab.desktop.DisplayScaleFactor
>> s.matlab.desktop.DisplayScaleFactor.PersonalValue = 2.0
It works well to solve the issue for Matlab scaling. But I still have the issue for Simulink, can someone help to look into this?
Jeson Wong
Jeson Wong le 13 Avr 2022
Thank you! Your method works like a charm.
[I am using Ubuntu 20.04 and matlab 2022a]
Xiao Liu
Xiao Liu le 14 Nov 2022
Ubuntu 20.04 and matlab 2022b. my 4k monitor is scaled by 200% in the system settings. my resolution is 162x161 dots per inch.
s.matlab.desktop.DisplayScaleFactor.PersonalValue = 2
the GUI and editer looks OK, but the datatips and function hints are still not scaled. you can see from the screenshots, they are very tiny.
I found the issue with this:
One needs to adjust the custum font size for the editor back to, say 12, and then in an open editor window just zoom in by pressing Ctrl + as much as you like.
Before:
Now:

Connectez-vous pour commenter.

Plus de réponses (3)

This worked really well for me on Ubuntu 16.04
>> s = settings;s.matlab.desktop.DisplayScaleFactor
>> s.matlab.desktop.DisplayScaleFactor.PersonalValue = 1.5
Additionally, I changed font properties in Preferences -> Font to higher font values.
Brian Chen
Brian Chen le 10 Mar 2017

1 vote

Has this issue been resolved in R2017a?

5 commentaires

Unfortunately, the release notes for R2017a contain no information about High DPI, so there are probably no changes yet. I have not been given a time-frame for this.
Yang
Yang le 10 Avr 2017
They do not plan to solve is I guess
You could start a support case on the topic and ask, and get told the answer under Non-Disclosure. The volunteers who answer questions here cannot reveal anything they might happen to have learned under Non-Disclosure.
THis is terrible. Matlab is extremely inconvenient to use with the extremely small symbols.
I recommend you raise the matter as a support case. Any of the volunteers who might happen to know something about the situation would not be permitted to comment about it.

Connectez-vous pour commenter.

Walter Roberson
Walter Roberson le 17 Déc 2016

0 votes

No, unfortunately as of R2016b the issue is not resolved.

1 commentaire

Fabio Garofalo
Fabio Garofalo le 17 Déc 2016
Modifié(e) : Fabio Garofalo le 17 Déc 2016
I accept your answer... both not the fact that matlab developers are underestimating (and they did for LONG time) this issue. I think that it is almost impossible to work for long time with this problem. However, thanks!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Programming dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by