如何用MATLAB绘制库存拉力条形图?

时间:2015-03-25 15:36:54

标签: matlab matlab-figure

我试图用MATLAB绘制这样的条形图,但我很困惑。

enter image description here

我感谢任何帮助。

P.S。 :我尽我所能

[Price time]=xlsread('one_year.xlsx');
formatIn='mm/dd/yyyy';
t=flipud(datenum(time,formatIn));
dates=linspace(t(1),t(end),13);
plot(t,flipud(Price))
%Set Ticks
labels = datestr(dates,3);
set(gca, 'XTick', dates);
set(gca, 'XTickLabel', labels);
Xlabels = linspace(min(Price),max(Price),6);
X = linspace(min(Price),max(Price),6);
set(gca, 'YTick', X);
set(gca, 'YTickLabel', Xlabels);
%Label Axes and Set Title
xlabel('Date')
ylabel('Price')
title('Price of Microsoft')

1 个答案:

答案 0 :(得分:0)

财务工具箱中的函数highlow会创建此类图表。