graphics_toolkit("gnuplot") close all paper_width = 21; paper_height = 12; # !! setting the figure position during the creation is mandatory with gnuplot # it is impossible to change it afterwards # set default figure units to centimeters first # otherwise sometimes paperposition is interpreted as pixels set(0, "defaultfigureunits", "centimeters") figure (1, "Position", [0, 0, paper_width, paper_height]) set(gcf,'Units','centimeters'); # This is what triggers the problem, # But I want to be able to control the positions # in centimeters, so normalized units is not a solution. set(gcf,'DefaultAxesUnits', 'centimeters'); [x, y, z] = peaks (); [c, h] = contour (x, y, z); clabel (c, h) xlabel xlabel ylabel ylabel title title paper_position = [0, 0, paper_height, paper_width]; set (gcf () , 'PaperUnits', 'centimeters'); set (gcf (), "PaperSize", [paper_height, paper_width]) set (gcf (), 'PaperPosition', paper_position); orient landscape print try.pdf