Why are graphic outputs different inside parfeval?

3 次查看(过去 30 天)
I am saving some figures to PDF files, but never showing them on the screen. I can call the same function which does this directly or with parfeval. Both approaches work, saving graphs of the same data in the same place.
The problem is that the files from the serial approach are about 85 KB with low resolution. Those generated in parallel are about 1000 KB, with high resolution. The outputs need to be identical.
get(gcf) showed a difference in PaperPosition, so now I set that inside the function and the get(gcf) outputs are identical. Where should I look next?
Edit: I have also tried setting (one at a time) DefaultFigurePaperPositionMode to manual (no effect), -bestfit flag in the print call (better aspect ratio, but still the big discrepancy in file sizes and resolution), and explicit resolution in the print call (-r200, for example, makes the serial file size go up a little, but doesn't change the parallel one at all!). I have also restarted and parallel pool and/or MATLAB between some of these changes just in case something was persisting in the workers.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Asynchronous Parallel Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by