how to draw a bar chart with max and min

31 ビュー (過去 30 日間)
farfar
farfar 2017 年 9 月 1 日
回答済み: Sathyanarayan Rao 2017 年 11 月 10 日
hello all I have a set of data including max, mean and min values. how can I present them in one chart like attached? I tried error bar but the result was not what i was looking for. Thanks

回答 (2 件)

Chad Greene
Chad Greene 2017 年 9 月 1 日
The errorbar function is designed to make graphs exactly like the one you provide as an example. If you tried using errorbar and it did not give the results you're looking for, give a minimal working example showing how you used errorbar, describe what you are looking for, and tell us what you don't like the results you obtained with errorbar.

Sathyanarayan Rao
Sathyanarayan Rao 2017 年 11 月 10 日
x = [1 2 3 4 5];
ymin = [0.01 0.02 0.03 0.04 0.05]; % lower error bar position
ymax = [0.02 0.03 0.04 0.05 0.06]; % upper error bar position
% draw error bar from minimum value to maximum value
errorbar(x,(ymin+ymax)/2,(ymax-ymin)/2)

カテゴリ

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