필터 지우기
필터 지우기

How can I set the actual value of the axis dimension?

조회 수: 3 (최근 30일)
sedat
sedat 2023년 5월 18일
답변: Varun 2023년 5월 19일
for example i wan to plot x=(1:10) and y=(1:10) but x axis size will be 12.1 centimeter(exactly) and y axis size will be 11.1 centimeter(exactly) so i can compare my solution with experimental data easily? thanks for answers

답변 (1개)

Varun
Varun 2023년 5월 19일
Hello!
While tthe exact dimensions of the plot axes cannot be specificed, you can set up the relative aspect ratio of the axes lengths using the "pbaspect" function.
A=rand([10 1]).*10;
B=rand([10 1]).*10;
plot(A,B)
pbaspect([12.1 11.1 1])
You may refer to the following documentation to learn more: https://www.mathworks.com/help/matlab/ref/pbaspect.html.
Hope this helps!

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by