error in plotting histogram

7 次查看(过去 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
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?
FIR
FIR 2011-11-4
Amiith say in the
month of jan number if visitors is 45
month of feb number if visitors is 90
month of mar number if visitors is 68
I want to display month in x axis and visitots in y axis

请先登录,再进行评论。

采纳的回答

Wayne King
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 个)

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by