How to save a plot as a jpeg file?

That’s a good question. Yes, use it only at the end, not sure what it will do if used before. Note that the GMT default is 700 dpi for pdf and 300 dpi for other formats.