admin管理员组文章数量:1293693
When on remote desktop, for all my colleagues and myself, matlab creates a figure that is for half outside of the screen and we cant see it until you enlarge it. Is there a permanent fix that doesnt require changing updating all our hundreds matlab scripts? If not, what are the best lines of code to have this working in general (remotely or locally) It doesnt happen if we open it locally.
When on remote desktop, for all my colleagues and myself, matlab creates a figure that is for half outside of the screen and we cant see it until you enlarge it. Is there a permanent fix that doesnt require changing updating all our hundreds matlab scripts? If not, what are the best lines of code to have this working in general (remotely or locally) It doesnt happen if we open it locally.
Share Improve this question asked Feb 12 at 16:30 MillemilaMillemila 1,6604 gold badges25 silver badges47 bronze badges 1 |1 Answer
Reset to default 0You can set the default figure position using
set(groot, 'DefaultFigurePosition', [x, y, width, height])
Ref this MATLAB Answers question: https://uk.mathworks/matlabcentral/answers/526580-change-de-default-position-of-plot
You could set this on startup, or before you run some code, and optionally reset it when you're done (I believe it will reset on MATLAB restart anyway). You can get the position before changing it with pos = get(groot, 'DefaultFigurePosition');
, you could also use the existing default to preserve the width
and height
whilst changing x
and y
.
本文标签:
版权声明:本文标题:When on remote desktop, Matlab creates a figure that is for half outside of the screen - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741582708a2386665.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
set(gcf,"Position",[200,200,200,200])
, where gcf gets the figure handle, the 4 element vector is (L to R) [X, Y, width, height] on screen. This could be done inside a program or in the command window at any time. – X Zhang Commented Feb 13 at 5:03