Overriding X axis data pts with dates for an area plot

I have an area plot and simply want the x axis values to display an array of dates instead of data points. I.e. if I have 1000 data points instead of the x axis labeling the data points from 1 to 1000 - I'd like the corresponding dates to appear instead. I realize this is pretty straightforward for bar and line graphs but I'm really struggling with the area plot, thanks in advance for anybody's help!

답변 (1개)

Walter Roberson
Walter Roberson 2012년 5월 7일

0 개 추천

datetick()

댓글 수: 1

Hi Walter, thanks for answering - datetick will ultimately format the x axis values but I need to override the x axis values with the actual dates. If I pass the array of both dates and values directly to the area plot it doesn't graph correctly.

댓글을 달려면 로그인하십시오.

카테고리

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

태그

질문:

2012년 5월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by