plot a time series data
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a daily observation of price for 32 years. The first column is date and the second column is price.
I want to plot all the data( every days in month) but since the data period is too long, I want to write the years in the x-axis like a picture I attached.Data is attached.
댓글 수: 0
채택된 답변
Star Strider
2022년 9월 9일
Try this —
T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1120695/sample.csv', 'VariableNamingRule','preserve')
figure
plot(T1.Date, T1.('Adj Close'))
xtickformat('MMM dd yyyy')
set(gca,'XTickLabelRotation',90)
.
댓글 수: 4
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Polar Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

