export_fig: PaperPosition not considered when exporting to PDF?
Show older comments
Hello, It seems as if the 'PaperPosition' vector is not considered when exporting to PDF by the otherwise excellent working File Exchange submitted function "export_fig". Does anybody else encounter this problem, or better, would anybody has a suggestion how to program things so that printing to A4 respects certain spacing between my figure and the paper borders, and forcing the figure to appear at certain width and height given in millimeters?
This is what I configured, not producing the wanted effect:
figureheight = 1200; figurewidth= figureheight / 1.618; % Golden Ration is known to be roughly = 1,618
set(gcf,'Position',[100 180 figurewidth figureheight],... % for screen
'PaperUnits','centimeters',... % for printing
'PaperOrientation','portrait',...
'PaperPosition',[3.5 16.5 figurewidth/100 figureheight/100],...
'PaperPositionMode','manual',...
'PaperSize',[20.984 29.6774],...
'PaperType','A4');
% (...)
export_fig(pdffilename, '-pdf', '-nocrop');
Answers (1)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!