How can I print a figure with true scale
13 views (last 30 days)
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')
Answers (1)
See Also
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!