Plotting a vertical line using ezplot

5 visualizaciones (últimos 30 días)
Brooke
Brooke el 5 de Sept. de 2012
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!

Respuesta aceptada

Matt Fig
Matt Fig el 5 de Sept. de 2012
Editada: Matt Fig el 5 de Sept. de 2012
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});

Más respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by