Plotting multiple lines on errorbar

10 ビュー (過去 30 日間)
M Carvalho
M Carvalho 2015 年 1 月 22 日
編集済み: M Carvalho 2015 年 1 月 22 日
Hello,
Given these two example series:
label1 = [1 2 4 6];
value1 = [1 2 3 4];
sdevi1 = [1 1 2 1];
label2 = [1 3 5];
value2 = [1 4 7];
sdevi2 = [0 1 0];
I can plot the error bars for both using:
errorbar(label1, value1, sdevi1);
errorbar(label2, value2, sdevi2);
But I would like to plot both lines in the same image. The problem is that the arrays have different size, and I cannot concatenate them, but this should be a perfectly valid plot... I've simplified the example, but in fact I have 17 lines, so its not very easy to plot every series and merge them using an image editor...
Any idea on how can I do that?
Thanks in advance!

採用された回答

M Carvalho
M Carvalho 2015 年 1 月 22 日
編集済み: M Carvalho 2015 年 1 月 22 日
Just managed to do it. For anyone having the same issue:
errorbar(label1, value1, sdevi1); hold on;
errorbar(label2, value2, sdevi2, 'r');

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by