bar plot from data

2 ビュー (過去 30 日間)
Francesco Marchione
Francesco Marchione 2022 年 11 月 7 日
回答済み: Francesco Marchione 2022 年 11 月 7 日
Hello,
I have the following data
y = [20 60 40 50 80 90]
and the following errors
err.high = [2 5 6 8 9 5].
err.low = [2 5 6 8 9 5].
I would like to obtain a graph exactly like the one attached, with the maximum values (the y-values) shown and with the legend grouped in the same way. I would like to have the font in latex.
Can you help me write the code in matlab?
Thanks in advance
  1 件のコメント
Davide Masiello
Davide Masiello 2022 年 11 月 7 日
What have you done so far?

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

回答 (1 件)

Francesco Marchione
Francesco Marchione 2022 年 11 月 7 日
x = 1:6;
data = [20 60 40 50 80 90]';
errhigh = [2 5 6 8 9 5];
errlow = [2 5 6 8 9 5];
bar(x,data)
hold on
er = errorbar(x,data,errlow,errhigh);
er.Color = [0 0 0];
er.LineStyle = 'none';
hold off

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by