getframe_nosteal_focus
By printing the plot to a temporary image file, and then reading the image in again, this function gets the plot without stealing the focus from anything else you might want to do with the computer while plotting.
It also avoids the issue of getframe sometimes capturing a window on top of the plotting window you want to capture.
Note that, in contrast to getframe, this does not capture the plot exactly as it looks on the screen, but instead the way it looks when you print it to an image file.
Cite As
Erik (2024). getframe_nosteal_focus (https://www.mathworks.com/matlabcentral/fileexchange/25972-getframe_nosteal_focus), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > Images > Convert Image Type >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.