Output PDF too large if using subplots with couple of grdimages

Hello,

I was making a figure with 16 subplots, all of them are plotting a 2D array (10000 * 7500) with grdimage. I am supposed to provide vector image, but the output PDF gets as large as 700MB, even if I scaled the file using something like “A+S0.3” or “A+s12c”.

gmt begin gmt_diff_dur_ensemble png,pdf A+s12c H3
gmt subplot begin 4x4 -Fs4c/3c -M0.25c/0.1c -A+o-0.4c/0c -Btblr

Actually any grdimage of such large 2D grid is so space costly that it cannot be included in a manuscript.

I was wondering how do people handle such issue? Either creating PNG with high enough resolution, or downsample the data, or using some smaller-size vecotr format (if any), or compress the output PDF somehow?**

I have had such problems as well and the simplest is to just produce a high-res PNG or JPG instead. You can use the A argument to gmt begin to change the dpi if the default is not good enough.