Updated plot_and_print() function for later versions of Octave.