I had the same problem with the latest Octave (3.8.1). This issue comes from GhostScript, not from Octave. There is a font management error.
To make sure, check your console after you try to print if this error is output (along with a lot more information):
GPL Ghostscript 8.63: Unrecoverable error, exit code 1
If this is the case, try this:
set (0, "defaultaxesfontname", "Helvetica") % this is the line to add BEFORE plotting hold on; plot(x1, y2) plot(x1, y2) print -djpg image.jpg
This will fix the problem by installing a font that GhostScript can handle without any problems. Please note: if you have already built the drawing, you will have to close it and execute it after setting defaultaxesfontname.
Source: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=710272
gaborous
source share