Plotting a vertical line using ezplot

6 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 2-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