plot all dates to x-axis in bar graph

11 次查看(过去 30 天)
d = datetime(2017,1:20,1);
x = rand(1,20);
bar(d,x)
I have this code, I want all the 20 dates to be visible on the x axis, but only 4 months are visible, what can I add in the code to get all the dates on the x-axis.

采纳的回答

Cris LaPierre
Cris LaPierre 2022-11-10
d = datetime(2017,1:20,1);
x = rand(1,20);
bar(d,x)
xticks(d)

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by