figure pop outside the screen
107 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi. I have trouble with a default figure position.
Somehow my figure always comes outside the window. If I reset the default figure position like below, the figure still appears outside the valid screen.
set(0, 'DefaultFigurePosition', [0 0 400 300]);
figure()
Does anybody know the good way to fix this problem?
和文
matlabの図が画面外に出る現象に困っています。 DefaultFigurePositionを設定しても,画面外右に出てくるのでMATLABのディスプレイ認識が間違っているのではと思っていますがPCごと再起動しても改善されません。 どうすればよいでしょうか。
3 commentaires
michio
le 4 Fév 2018
This might be related to your issue. Are you using MATLAB via remote access or do you have multiple screens?
What does the following reply?
get(0,'ScreenSize')
Réponse acceptée
michio
le 6 Fév 2018
Thanks! I forgot to ask. What version of MATLAB are you using and on what OS?
Also please note that MATLAB sets the display size values for this property at startup. The values are static and your system display settings change do not reflect on those values. MATLAB needs to restart to refresh the value.
See: https://jp.mathworks.com/help/matlab/ref/root-properties.html describes the properties related to the graphics.
One thing caught my attention is your numbers do not seem to be in pixel. As stated in the "Units" property of the following page, 'ScreenSize' and 'MonitorPosition' will in pixel by default setting. Could you try the following to double check?
get(0, 'Units');
get(0, 'MonitorPositions');
I am guessing if your 'Unit' is not in pixels (and if you did't change it), it could indicate that there are some scripts that do changes the graphics properties at start-up. Any ideas?
startup.m is one possibility.
Could you check if you have startup.m by executing
which -all startup
Another thing you can try is to refresh your prefdir folder, which contains preferences, history, and layout file. You can delete the folder and restart MATLAB.
View the location of the preferences folder by
prefdir
3 commentaires
michio
le 7 Fév 2018
Just to clarify, what happens if you comment out all the command on your startup.m and restart MATLAB?
Just wanted to double check the values of defaultfigurepositon without startup.
michio
le 7 Fév 2018
Also on prefdir, you can make a backup copy of the original folder and put them back later with the same name. Then any setting you currently have will be restored.
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur グラフィックス オブジェクトのプロパティ dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!