I would like to know, how I can plot cluster of time-series with different colors, when I'm using loop. I know that the procedure ggplot()
do it, but I cannot use it before loop. Here is the code:
plot(units_sold[,1], t="l", ylim=c(0,4500))
for (i in 2:126) {
if (klaster1[i,2] == "1")
lines(units_sold[,i])
}
Where should I put in the code the option to plot every time-series in cluster with different color?