How to achieve that getframe doesn't rise the figure above the other ones?

Hi! I'm using the function getframe to save a plot as a matrix. It's working fine but, there is a very annoying problem. Every time I call the function, it rises the figure in question above all the other ones and this is not right for me... I have tried with set(0,'CurrentFigure',3) before f=getframe(3); but it doesn't work... :(
Any help?
Thankyou

Answers (2)

You can omit the lifting of the figure, but then GTEFRAME replies the contents of the screen at the position of the figure. This is most likely not the wanted behaviour.
See print for a method to save the contents of a figure without the need to bring it to the top.

3 Comments

I've tried "print". But the time spent for saving the file, load it and then delete it's too much for my purpose...
getframe() is not likely to change on MS Windows machines. Perhaps the situation will improve in the eventual MATLAB 8.x with Handle Graphics 2 (HG2), perhaps not.
If you are really careful, you can use the undocumented function HARDCOPY, which is does the screen capture for PRINT also. HARDCOPY replies the screen contents as array, but it crashs brutally if e.g. any object has an EraseMode different from 'normal'.

Sign in to comment.

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Asked:

on 24 Jan 2012

Community Treasure Hunt

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

Start Hunting!