How to get default position of figure to be left side monitor
10 次查看(过去 30 天)
显示 更早的评论
I used to have my 'figure monitor' on the right side, but I changed offices and it's not convenient there anymore. So, I went into the startup.m file and changed the line to
set(0, 'defaultFigurePosition', [-1267 44 1256 872])
so that figures would be born in the left monitor. The problem is that the negative is ignored and rounded to one. So, when I generate a figure
f = figure
and query the postion I get
f.Position
ans =
1 44 1256 872
Anyone know how to fix this?
0 个评论
回答(1 个)
Jana Katharina Wrosch
2017-11-8
Try normalizing the units first:
f_pie=figure('Units', 'normalized', 'Position', [-1,0,0.8,1]);
This should work also for the default position.
3 个评论
Jeff Severino
2020-2-14
this is because the first digit is the position from the left most corner. try changing your default monitor or account for the extra pixels because it technically is two combined screen. Check the resolution
Brian Derstine
2023-2-23
编辑:Brian Derstine
2023-2-23
seems like a bug. The figure position code assumes that the main display will be the leftmost display and all other displays will be to the right. This is not a safe assumption. Plenty of use cases where the main display is the rightmost or center display (or some other arrangement), which breaks when negative values for Position are rounded up to 1.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!