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일

0 개 추천

d = datetime(2017,1:20,1);
x = rand(1,20);
bar(d,x)
xticks(d)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

질문:

2022년 11월 10일

답변:

2022년 11월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by