y=2.84;
x=0.091713;
a=bar(y,x,1);hold on;
z=3.834;
x=1.011;
s=bar(z,x,1)
i want to plot this in bar graph...which means it should correspond with the value. Any help thanks ! what i get is attached. As u can clearly see that the bars are not depicted well, plus they are attached to each other..i want a gap between them

댓글 수: 6

Azzi Abdelmalek
Azzi Abdelmalek 2016년 5월 19일
i want to plot this in bar graph...which means it should correspond with the value:
What does that mean?
JL555
JL555 2016년 5월 19일
see attached file
JL555
JL555 2016년 5월 19일
2.84 and 3.834 are in x axis
Star Strider
Star Strider 2016년 5월 19일
Your code produces the plot in the image.
What is the problem?
JL555
JL555 2016년 5월 19일
The two bars aren't suppose to join...i want to separate them a bit
JL555
JL555 2016년 5월 19일
something like this

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

답변 (1개)

Jos (10584)
Jos (10584) 2016년 5월 19일
편집: Jos (10584) 2016년 5월 19일

0 개 추천

Plot them in a single statement. Concatenate the X-values and the Y-values to do that:
X = [2.84 3.834];
Y = [0.091713 1.011];
s=bar(X,Y,1)

댓글 수: 2

JL555
JL555 2016년 5월 19일
still getting the same plot
Jos (10584)
Jos (10584) 2016년 5월 20일
편집: Jos (10584) 2016년 5월 20일
Did you read the documentation/help of bar?
bar(X,Y,0.8)

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

카테고리

도움말 센터File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기

태그

질문:

2016년 5월 19일

편집:

2016년 5월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by