Controlling default location where figures are drawn
10 次查看(过去 30 天)
显示 更早的评论
I find that whenever I create a sequence of figures, they are all drawn overlapped in the same location on the screen, so that I have to do a lot of clicking and dragging to view them. Is there a preference setting somewhere that can change this default behavior, e.g., so that when they are drawn, they appear before me spread out like a deck of cards across the desktop?
0 个评论
采纳的回答
Walter Roberson
2015-11-7
The location that figures are placed at, when not placed specifically, is the coordinates
get(0,'DefaultFigurePosition')
with units get(0,'DefaultFigureUnits') . (For R2014b or later, it is better to use groot instead of 0 in these commands, so for example get(groot,'DefaultFigurePosition')
These values are fixed coordinates that do not take into account any other figure that might exist.
You might want to set the root DefaultFigureWindowStyle to 'docked' . This will get you tabbed plots instead of being all spread out.
You could also set the root DefaultFigureCreateFcn to the handle of a routine you create, and give that routine the responsibility of looking to see where existing figures are, and setting the Position to display elsewhere. Watch out for figures that are being positioned by program; you could probably detect them by noticing that their Position would not match the default Position.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!