Plotting a vertical line using ezplot

3 ビュー (過去 30 日間)
Brooke
Brooke 2012 年 9 月 5 日
I have a graph and I would like to add a vertical line say x=1 to the graph. how might I do that? (Perhaps ezplot doesn't work for that?)
thank you!

採用された回答

Matt Fig
Matt Fig 2012 年 9 月 5 日
編集済み: Matt Fig 2012 年 9 月 5 日
This will put a vertical line in the middle of the axes. Adjust as needed.
LIM = get(gca,{'xlim','ylim'});
L = line(mean(LIM{1})*[1 1],LIM{2});

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-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