error in plotting histogram
조회 수: 6 (최근 30일)
이전 댓글 표시
I have to plot histogarm , i have values
A=[45,90,68]
b=['jan','feb','mar']
i want to plot histogram,is it possible
i have seen matlab help and in google,but can find only for one values for x or y ,but not for this
can u tell how to process please
and for scatter plot i tried
scatter(A,B)
but not working
댓글 수: 2
Amith Kamath
2011년 11월 4일
You may need to elaborate a bit more about what A and b is, in the sense that b is not even a ordinal set! and hence scatter won't work, for a good purpose. Do you want to plot A, and label it with b?
채택된 답변
Wayne King
2011년 11월 4일
Hi, one thing you can do:
A=[45,90,68];
b = {'jan','feb','mar'};
bar(A)
set(gca,'xticklabel',b)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!