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.
Walter Roberson
2021 年 3 月 3 日
編集済み: Walter Roberson
2021 年 5 月 1 日
カテゴリ
ヘルプ センター および File Exchange で App Building についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!