How do I save plots calculated by gamultiobj separately?
1 view (last 30 days)
Show older comments
Hello everyone,
I'm trying to solve a complex optimization problem using gamultiobj. For my analysis I need four plots for each scenario I'm going to analyze. The graphs are the following (don't mind the fact they're incomplete).
I have to put each graph on a Word file. Is there any way I can save each one of them separately without intervening on the code so I can then scale them as I best see fit directly on Word with no loss of image quality? I could screenshot the command window above but of course the quality would be quite poor. I can't add new commands on the code as of now since it takes a lot of computation time and the program is still running.
Any suggestions will be greatly appreciated!
Kind regards.
William
0 Comments
Accepted Answer
Benjamin Kraus
on 23 Dec 2022
Unless the code that is doing the computation is explicitly leveraging some form of parallel processing, the code that exports figures to either files or the clipboard will run on the same thread as the computations. Therefore, you will need to cancel or pause the code somehow before you will be able to export any images.
You could try opening the MATLAB editor and clicking "Pause" (to pause your computation), but I don't know how well that would actually work, and a lot depends on exactly how the computation code was written.
I don't think you will be able to get a much better answer without posting more information about the computation code.
If you find yourself modifying the computation code, you can try leveraging backgroundPool to move the computation into a parallel process, and then you can probably add a button to your app that calls exportgraphics or copygraphics.
More Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!