How do I plot a date along the x-axis?
이전 댓글 표시
Hi! I have 2 sets of data that shows temperature over a long period of time. I am trying to plot a graph with dates along the x-axis.
I have shortened the data as my original table has hundreds of points, but one is a table formatted like this:
Country M/DD/YY M/DD/YY M/DD/YY
---------- ------- ------ ------
{CountryA} 15 18 20
{CountryB} 17 22 25
{CountryC} 16 19 22
where the date is formatted in the table's column variable.
Another is a table like this:
Date Temperature
----- -----------
{'M/DD/YY'} 20
{'M/DD/YY'} 22
{'M/DD/YY'} 24
where the date is formatted inside a cell in the first column of a table.
I'm assuming it has something to do with the x-ticks and datetime functions, but I can't seem to get my 'start' point as my first date and my last point as the last point in my data. As this is being updated daily, this last point keeps changing.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Calendar에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!