フィルターのクリア

how to plot x-axis only

31 ビュー (過去 30 日間)
zilai si
zilai si 2019 年 5 月 27 日
回答済み: Star Strider 2019 年 5 月 27 日
hello, everyone, i wonder how to plot a gragh like this:
QQ图片20190527221922.png
with x-aixs only and two directions

採用された回答

Star Strider
Star Strider 2019 年 5 月 27 日
This comes close:
figure
xlim([-4.2 4.2])
plot((rand(1,20)-0.5)*3, zeros(1,20), '+r')
text(min(xlim), 0.025, '\leftarrow', 'HorizontalAlignment','left', 'VerticalAlignment','middle', 'FontSize',18)
text(max(xlim), 0.025, '\rightarrow', 'HorizontalAlignment','right', 'VerticalAlignment','middle', 'FontSize',18)
set(gca, 'XAxisLocation','origin', 'YColor','none')
Experiment to get the result you want.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpecifying Target for Graphics Output についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by