My screen resolution is set to 1600x1200. In MATLAB, I set my "DefaultFigurePosition" property using the following command:
set(0,'DefaultFigurePosition', [400 100 1050 1000])
I then open multiple figure windows using the following loop:
for i = 1:46
figure
end
On the last figure, I receive the following message in the command window:
Out of Windows Resources: Allocation of bitmap failed.
Disabling backingstore for current figure.
Unfortunally, Windows has a limited number of graphics resources.
You can check the number of resources using the Task Manager, at the tab Processes, clicking the menu View/Select Columns and mark the "GDI objects" option.
Then you can see the number of graphics objects (GDI) used by each process.
The maximum amount of GDI objects per process is roughly 9900 objects. With more than that the process will not be able to draw them correctly.
One way to avoid this message is to reduce the default figure size, specified by the third and fourth elements of the "DefaultFigurePosition".
Also, you can try increasing Java VM heap space as described in the following Technical Solution "How do I increase the heap space for the Java VM in MATLAB 6.0 (R12) and later versions?" at:
http://www.mathworks.com/support/solutions/en/data/1-18I2C/
Also, sometimes, changing the renderer to opengl might work. This can be done as following:
set(h,'Renderer','opengl');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With