How can I count number of bars in a bar graph?

조회 수: 3 (최근 30일)
Zara Khan
Zara Khan 2018년 6월 24일
댓글: Zara Khan 2018년 6월 25일
figure;
imshow(Image);
pix=impixel(Image,X,Y);
hold on;
plot(X,Y,'LineWidth',2);
figure;
bar(pix,'r');
I have plotted this pix using a bar graph which is a continuous data set. Now how to count the no of bars in this graph and how I will calculate the distances from both the axes to each of the bar?and how to store all these values to an excel file. I am getting many graphs as my folder consisting of 50 images. How to do this?

답변 (1개)

Image Analyst
Image Analyst 2018년 6월 24일
Try adding this:
numBars = length(xticks)
since for every bar group you'll have a tick mark.
  댓글 수: 5
Image Analyst
Image Analyst 2018년 6월 24일
No idea. Why would you even care about that?
Zara Khan
Zara Khan 2018년 6월 25일
I am trying to extract some features from it. But unable to do so till now. Moreover this xticks not working in R2014b.

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

카테고리

Help CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by