plot a time series data
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
neda fathi
il 9 Set 2022
Commentato: Star Strider
il 10 Set 2022
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 Commenti
Risposta accettata
Star Strider
il 9 Set 2022
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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Polar Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

