Matlab plotting can be quite slow, as can Python Matplotlib plotting. Sometimes, Matlab parfor can be used to plot in parallel, when all parfor restrictions are met. However, parallel plotting in Matlab doesn’t always work, or may work on some operating systems but not others. So use great caution if making a “parfor” plotting loop–it may not work for others.
Here are some errors we’ve gotten when trying to do relatively simple plots in parallel:
Warning: A worker aborted during execution of the parfor loop. The parfor loop will now run again on the remaining workers. > In distcomp/remoteparfor/handleIntervalErrorResult (line 240) In distcomp/remoteparfor/getCompleteIntervals (line 387) In parallel_function>distributed_execution (line 741) In parallel_function (line 573)
Error using distcomp.remoteparfor/rebuildParforController (line 194) All workers aborted during execution of the parfor loop. Error in distcomp.remoteparfor/handleIntervalErrorResult (line 253) obj.rebuildParforController(); Error in distcomp.remoteparfor/getCompleteIntervals (line 387) [r, err] = obj.handleIntervalErrorResult(r);
Warning: worker(s) crashed while executing code in the current parallel pool. MATLAB may attempt to run the code again on the remaining workers of the pool, unless an spmd block has run. View the crash dump files to determine what caused the workers to crash.