Matlab not generating pdf file with accurate measure

3 次查看(过去 30 天)
I am generating a *pdf* by saving a *figure* generated from following *Matlab code*. When *x=4*, it generated a *square* whose measure is exactly *4 inch* using *pdf measure tool*. But when *x=5*, something went wrong and generated *pdf loses accuracy*(check the snaps below).
I am actually trying to draw an accurate square (whose pdf measure tool measure the same dimension as defined by x), such that center of the printed square, and the center of the US letter (8.5" x 11") matches exactly.
clear all
close all
x=4;
plot([0 x x 0], [0 0 x x]), axis tight
% set(gca, 'Position',[0.1 0.1 .8 .8])
set(gca, 'Units','inches', 'Position',[1 1 x x])
set(gcf, 'Units','inches', 'Position',[0 0 x+2 x+2])
% set(gcf, 'PaperUnits','inches', 'PaperPosition',[0 0 8.5 11])
**X=4**(measure tool says 4 inch). Square is equally far apart from right and left, and from top and bottom.
*X=5*(measure tool says 5.47 inch) and shifting the square little more towards right and towards bottom.
[1]: http://i.stack.imgur.com/dHVAF.jpg

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by