Need Help getting a 1:1 scale on a plot
111 次查看(过去 30 天)
显示 更早的评论
I'm plotting a polar function 2*cos(t)+4 specifically, and I need to print it out so that the units on the plot are inches in real life as I'm going to cut it out of something and need it to be that exact size. I'ma bit new to matlab and Im going to be doing a lot of these soon so what would be the best way to do this? or is there another program altogether which might be better for something like this? Thank you in advance!
0 个评论
回答(3 个)
Sean de Wolski
2013-7-30
In order to get the axes sizes to be the same, use:
axis equal
As far as printing to specific dimensions, set the figure's 'PaperPosition' and 'PaperUnits' to inches and the location on the piece of paper you want to have printed. Then print it with print()
0 个评论
Azzi Abdelmalek
2013-7-29
t=0:0.1:10
y=2*cos(t)+4
plot(t,y)
fig_width=5;
fig_length=10;
set(gcf,'Units','inches','position',[0 0 fig_width fig_length])
1 个评论
Daniel Shub
2013-7-29
You probably need to set the axis size to depend on XLIM and YLIM, otherwise things are going to be off. Unless your monitor is really well calibrated, the on screen size won't be perfect. Further, you will need to be careful when printing that the printer doesn't do scaling.
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!