How can I print a figure with true scale
Show older comments
Hi, I am trying to printout a figure and I want that it will be 5cmX10cm When I run the code the figure I get on the screen is almost 5cmX10cm - But not precise and the figure I get in the PDF doc is 6.5cmX13 cm
I need that Plot to be 5cmX10cm precise, what I need to change in my code?
Many thanks.
My code is:
Width=5
Height=10
s=num2str(Number);
filename= [s 'Pic'];
pic=Picture(Mask);
axis off
set(gca,'units','centimeters')
set(gca,'xlimmode','manual','ylimmode','manual')
axpos = get(gca,'position')
set(gca,'position',[axpos(1:2) Width Height])
set(gcf, 'PaperUnits', 'centimeters')
print(filename, '-dpdf' , '-r0')
2 Comments
@Yuvall Larom: please don't post duplicate questions:
You can simply edit your existing question.
If you really want to specify the exact image size in a document, then this is possible with TeX to a precision unmatched by any other tool:
and so presumably also with LaTeX and tikz.
Answers (1)
Selva Karna
on 29 Jul 2016
0 votes
figure,imshow(your image name)
Categories
Find more on Annotations 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!