Matlab not generating pdf file with accurate measure
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/159448/image.jpeg)
*X=5*(measure tool says 5.47 inch) and shifting the square little more towards right and towards bottom.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/159449/image.jpeg)
[1]: http://i.stack.imgur.com/dHVAF.jpg
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!