Need Help getting a 1:1 scale on a plot

조회 수: 25 (최근 30일)
Manbir
Manbir 2013년 7월 29일
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!

답변 (3개)

Sean de Wolski
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()

Azzi Abdelmalek
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
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.

댓글을 달려면 로그인하십시오.


Manbir
Manbir 2013년 7월 30일
The script did not work. I'm not exactly sure what it did if anything. I need the figure in polar a simple change from plot to polar but the figure didn't expand at all or maybe it did a very small bit but basically what it should be is the figure inside plot the actually drawing not including axes and all should be 8 inches around.

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by