Drawing a verticle Line in a candle chart

1 Ansicht (letzte 30 Tage)
AA
AA am 22 Jun. 2016
Beantwortet: Chad Greene am 22 Jun. 2016
assume the following candle chart
candle(col2,col3,col4,col1)
How can I draw a verticle line intersecting the x axis on the chart?

Antworten (1)

Chad Greene
Chad Greene am 22 Jun. 2016
Just enter the start and end points of the line and use plot. If you want the line to be at x = 5, and if you want the line to go all the way from the top of the chart to the bottom, do this:
candle(col2,col3,col4,col1)
x = [5 5];
y = ylim; % (gets current y limits)
hold on
plot(x,y,'-','color','red','linewidth',2)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by