Azzera filtri
Azzera filtri

How to draw a vertical line with a given height?

51 visualizzazioni (ultimi 30 giorni)
I use
line([1 1]*posx)
to draw a vertical line in a figure. Can I also draw a vertical line with a specific height?

Risposta accettata

CS Researcher
CS Researcher il 4 Mag 2016
For a line from (x,y) to (x,y+height), Use this:
line([x x], [y y+height]);
From origin it could just be
line([0 0], [0 height]);

Più risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by