Reduce/Avoid too much time spent in getSnapshotImage

Hi I'm analyzing some test data which originates from csv-files. This data is plotted into boxplots. I want to write the plots into a pdf report using mlreportgen.report. The data consists of 256 tests which contain 4 boxplots each and 2 of them should be displayed next to each other. For generating the report I'm following the subchapter "Add Multiple Figures to a Report Page" of this example. The code is the same as in the example but instead of surf I'm calling boxplot and I'm looping over it. After running it the first time I noticed that the script took ages. Profiling it told me that most of the time is spent in
getSnapshotImage();
Reading the documentation and stepping through the code showed me that this creates/writes a file with the data that comes from my figure.
Is there a way to speed this up? Can I tell Matlab to not write a file and instead keep this in memory?

Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products

Release

R2018b

Asked:

on 17 Jun 2020

Community Treasure Hunt

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

Start Hunting!