How can I change the units of a plot function in the plot tab?
71 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
Adam Danz
2019 年 4 月 1 日
編集済み: Adam Danz
2019 年 4 月 1 日
After producing the plot,
h = gca;
h.XTickMode = 'manual';
h.XTickLabel = h.XTick * 5000;
h.XLabel.String = 'Frequency (x \pi rad/sample)';
Note that this changes the tick labels, not the ticks themselves. So if you're setting axis limits, you'll continue working with the normalized units 0:1.
2 件のコメント
Adam Danz
2019 年 4 月 1 日
編集済み: Adam Danz
2019 年 4 月 1 日
All I did was to grab the axis handle. With that handle you can edit all sorts of properties;
To set axis limits
h.XLim = [0,1];
h.YLim = [-180, -110];
To name the figure you'll need the figure handle
figHandle = gcf;
figHandle.Name = 'myFigure';
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Line Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!