Plot multiples time series

17 Ansichten (letzte 30 Tage)
Maria Hernandez
Maria Hernandez am 6 Aug. 2020
Kommentiert: Maria Hernandez am 11 Aug. 2020
I have an array (365 , 40), Every column contains 365 records of a variable, each record corresponds to a day. And there are 40 years of data so every column contains data for a year. I need to plot the 40 time series in the same graph.

Antworten (1)

KSSV
KSSV am 6 Aug. 2020
Let A be your 365*40 data.
Multiple options.
plot(A)
The above options plots 40 curves in one graph. It will be confusing.
for i = 1:40
subplot(40,1,i)
plot(A(:,i))
end
The above plots 40 subplots. May not look good.
pcolor(A)
shading intepr
colorbar
The above plots a nice colorbar plot.
  1 Kommentar
Maria Hernandez
Maria Hernandez am 11 Aug. 2020
The lines of the chart looks sharper after using the shading interpreter sentence. However since I must use a lines plot the colormap is not useful.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by