Why does MatLab subbornly enforces an accessible A4 format width of 17.197916666666664 cm (not 21 cm)???
2 ビュー (過去 30 日間)
古いコメントを表示
hello,
here is what appears to be a stupid assumption of MatLab, about what are the capabilities of your printer with respect to its minimum margin capabilities :
try this one:
F= figure;
h = gcf ; % current figure handle
h.Units = 'centimeters';
h.PaperType= 'A4';
h.PaperUnits = 'centimeters';
h.PaperOrientation= 'landscape'; % 'portrait';
h.PaperPositionMode= 'manual'; % 'auto';
h.Position = [0 0 29.7 21.0 ];
h.PaperSize = [29.7 21.0];
now, type on the command line:
>> h.position
ans = 0 0 29.7000 17.1979
From the property inspector the last number is actually 17.197916666666664 cm
or differently just type:
sprintf('Obtained Width = %20.18f cm ...',h.Position(4))
So it looks that Matlab enforces what it believes is an "Grand Universal Value for Accessible Margins for all Existing Printers in the World"...;
>>> 17.197916666666664 cm: How clever from MatLab indeed !
>>> Or it is a bug that the MatLab team is unable to correct ?
A new acronym should be defined for MatLab: WatYouGetIsNotWhatYouWant
:-(
0 件のコメント
回答 (2 件)
Steven Lord
2022 年 3 月 27 日
What is the value of the figure's PaperPosition property? The purpose of that property is to specify the "Figure size and location on page when printing or saving, specified as a four-element vector of the form [left bottom width height]." as opposed to the Position property which controls "Location and size of the drawable area, specified as a vector of the form [left bottom width height]. This area excludes the figure borders, title bar, menu bar, and tool bars."
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!