Need Help getting a 1:1 scale on a plot
110 views (last 30 days)
Show older comments
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 Comments
Answers (3)
Sean de Wolski
on 30 Jul 2013
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 Comments
Azzi Abdelmalek
on 29 Jul 2013
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 Comment
Daniel Shub
on 29 Jul 2013
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.
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!