Why does a plot function in revision R2014b require over 100MB of memory

When I execute the following code I noticed that Matlab reduces the amount of free memory by more than 100MB.
figure; plot([0 1 2 3 4 5 6 7 8 9]);
Are there setting for memory reservation in an axis or is this a bug? I am using a windows 7 PC with 8GB memory and I can only plot 8 figures. Never seen this problem in Matlab version R2013b.
Kind regards,
Hans van Hulst

1 Comment

I am also having memory issues on a Windows 7 machine with 8 GB. But instead of 100 MB/figure it is 500MB to 1GB/figure. Press the wrong button and I am waiting half an hour while my machine streams back and forth to the disk.
I want to be able to jump between multiple figures. If I use subplots the figures end up too small, but the memory is manageable.
I have tried tabs within figures, but I still get the memory problem.
Currently I am using dialog boxes so that I can examine one figure at a time, but that is not my preferred solution.
Should I expect that sort of memory usage for a figure?
Is there another way to look at multiple full size plots?

Sign in to comment.

Answers (1)

How do you measure the memory consumption?
Is the memory occupied temporarily or statically?
What happens after calling this command twice?
figure; plot([0 1 2 3 4 5 6 7 8 9]);
figure; plot([0 1 2 3 4 5 6 7 8 9]);
Do you observe 200MB of used RAM or does it stay at 100MB + a small addition?
If one plot occupies 100MB, and this would be a static usages, then 8 plots consume 800MB. If you cannot open more than 8 figures on a 8GB machine, there must be another problem.

1 Comment

I measure the memory consumption using the windows resource Monitor. The memory is occupied as long as the figure available. The memory is returned when the figure is deleted. Every figure, plot combination will require another 100 MB. It is not that I have no memory available. The resource monitor says 4.5GB in use, 2.5GB standby and 1GB free. When the free memory reaches a view MB the next plot command reports: Warning: an error occurred while drawing the scene.
On another computer having the same hardware configuration I do not have this problem.

Sign in to comment.

Categories

Find more on Graphics Performance in Help Center and File Exchange

Products

Asked:

on 12 Mar 2015

Commented:

on 30 Sep 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!