Drawing a verticle Line in a candle chart

1 回表示 (過去 30 日間)
AA
AA 2016 年 6 月 22 日
回答済み: Chad Greene 2016 年 6 月 22 日
assume the following candle chart
candle(col2,col3,col4,col1)
How can I draw a verticle line intersecting the x axis on the chart?

回答 (1 件)

Chad Greene
Chad Greene 2016 年 6 月 22 日
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)

カテゴリ

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