Random ordering of figure numbers
8 次查看(过去 30 天)
显示 更早的评论
When I installed R2015a, figure numbers were then generated in random order. I have a script that produces many graphs at once, then tiles them. I was astonished to find they would no longer display in the order executed. The figure numbers were correct but they did not arrange in numerical order when tiled. This never happened before. Any clues as to what's going on? Could it be the tiling function? I checked get(0, 'Children') and it lists the figures in reverse display order (first is last in the list). FWIW, when the tiling function is not used, figures stack on one another in numerical order.
3 个评论
Mike Garrity
2015-9-29
This is just a guess, but I suspect that the code you're using to do the tiling is using GCF. If you create a bunch of figures in a row without calling drawnow, then which one becomes GCF is up to the operating system. This was always a bit unpredictable, but with the new multithreaded graphics system which was introduced in R2014b it became rather more unpredictable.
For this sort of thing, it is probably better not to depend on the value of GCF. Instead, use the return value of the figure function. Or, as you've noticed, you can look at the children of the root object. Either of those should be more predictable.
Alternatively, you could try adding some calls to drawnow to your code to try and keep the threads more in synch, but I don't think that would be a very robust solution.
But, as I said, this is just a guess and I may be all wet.
回答(1 个)
Christopher Ison
2015-9-29
1 个评论
Jon
2015-9-30
How are you creating the figures? In a loop like this?
for i = 1:N
figure(i) = plot(whatever);
end
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!