Drawing the x-axis at y=0
이전 댓글 표시
Hello. At least as the default option, MATLAB draws the x-axis at the bottom-most part of the graph. However, I would like to draw it at y=0 as is a common convention. Is it possible in MATLAB? (including the scale on the axis, and replacing the default axis drawn at the bottom)
Thanks, David
채택된 답변
추가 답변 (4개)
Kyle Johnson
2023년 3월 30일
8 개 추천
Matlab now has support for this. You can set the property of the axes handle. No tricks of FEX required. :)
ax = gca;
ax.XAxisLocation = "origin";
ax.YAxisLocation = "origin";
댓글 수: 1
Christian Schröder
2024년 1월 18일
Thanks! This is the correct way to do this in modern MATLAB, and this should be the accepted answer.
Amith Kamath
2011년 11월 4일
0 개 추천
You may want to look at this example:
Jan
2011년 11월 4일
0 개 추천
Meade
2017년 1월 18일
0 개 추천
For posterity, this has been fixed in the HG2 Update. Linked below since this thread is currently the top search result on the topic.
댓글 수: 2
Bartche
2021년 3월 3일
The page you were looking for does not exist. Use the search box or browse topics below to find the page you were looking for.
카테고리
도움말 센터 및 File Exchange에서 App Building에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!