필터 지우기
필터 지우기

How to add bounds to a bar graph?

조회 수: 2 (최근 30일)
Luciano Campos
Luciano Campos 2016년 4월 20일
댓글: Luciano Campos 2016년 4월 21일
Hi, I'd like to add upper and lower bounds using, respectively, +t and -t to this bar chart:
figure(1)
subplot(3,1,1)
bar(R11)
subplot(3,1,2)
bar(R32)
subplot(3,1,3)
bar(R33)
All variables are in the attached file.mat.
I'd like the bounds to be dotted lines.
Can anybody help me?
best,

채택된 답변

dpb
dpb 2016년 4월 20일
편집: dpb 2016년 4월 21일
Not sure what you mean, precisely, but try
subplot(3,1,1)
bar(R11)
hold on
hE=errorbar([1:length(R11)],R11,t*ones(size(R11)),'*');
hL=get(hE,'children');
set(hL(2),'linestyle',':')
etc., for other axes...
for starters. Salt to suit.
Oh, for a simple line, well, there's line...
bar(R11)
line([1 length(R11);1 length(R11)].',[-t -t;t t].','linestyle',':')
  댓글 수: 2
Luciano Campos
Luciano Campos 2016년 4월 21일
Hi, thanks for your answer. Though that's not exactly what I'm looking for. I'm trying to replicate this graph:
Thanks in advance.
best,
Luciano Campos
Luciano Campos 2016년 4월 21일
That's great!! Thanks!
best,

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-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