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.