Plot 2D Charts with fints

1 回表示 (過去 30 日間)
Jake
Jake 2015 年 4 月 15 日
コメント済み: Jake 2015 年 4 月 16 日
Hi MATLAB Experts,
I am creating 4x2 subplot. By using fints, how can I set different color for each line as follows: Blue / Red / Dark Green..
Also, I'd like to have annotations (text box) to show data for last observations for each line. Please share your thoughts!! Thanks in advance!
for d=1:8
index(d).sum = [plotdate indexA(:,d) indexB(:,d) indexC(:,d) ];
index(d).fints = fints(index(d).sum);
subplot(4,2,d);
plot(index(d).fints);
end
Best, Jake

回答 (1 件)

Philip Caplan
Philip Caplan 2015 年 4 月 16 日
Hi Jake, you can create a cell array to hold all the line styles you would like to use and then pass the indexed values to "plot". For example,
linestyles = {'r-','k+','go','b--','c^','m.-','y-','r--'};
for d=1:8
subplot(4,2,d);
plot(d*(1:10),linestyles{d});
end
For more information on line styles and cell arrays, please see
and
For creating text box annotations, please see
and
  1 件のコメント
Jake
Jake 2015 年 4 月 16 日
Thank you so much!!!!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by