title: r ggplot mutiple lines - how to show different color instead of gradient
body: <p>I have a data frame like below: </p>
  
  <p><code>head(df)</code></p>
  
  <pre><code>index 2016-07 2016-08 2016-09 2016-10 2016-11 2016-12 2017-01 2017-02 2017-03
  1     1    30.5   31.75      32    34.5   39.75   39.75   37.75      36      36
  2     2    30.5   31.75      32    34.5   39.75   39.75   37.75      36      36
  3     3    30.5   31.75      32    34.5   39.75   39.75   37.75      36      36
  4     4    30.5   31.75      32    34.5   39.75   39.75   37.75      36      36
  </code></pre>
  
  <p>Basically there are 250 rows , each row for each date I have a number. I want to put all 250 lines on the same plot which I thought would be super easy but actually not. According to other posts I have read, i used <code>melt</code> to break it down and got the following:</p>
  
  <pre><code> index variable value
  1     1  2016-07  30.5
  2     2  2016-07  30.5
  3     3  2016-07  30.5
  4     4  2016-07  30.5
  5     5  2016-07  30.5
  6     6  2016-07  30.5
  </code></pre>
  
  <p>and then by <code>ggplot2()</code> I used</p>
  
  <pre><code>ggplot(data=mdf, aes(x=variable, y=value, group = index,color=index)) +
  geom_line()+ theme(axis.text.x = element_text(angle = 90, hjust = 1),axis.text=element_text(size=5))+ ggtitle(paste0(comdtylist[k]," ",string))}
  </code></pre>
  
  <p>Unfortunately by doing this I can only get the graph whose color is gradient.</p>
  
  <p><a href="https://i.stack.imgur.com/TTauT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TTauT.png" alt="enter image description here"></a>
  Now I just want the lines to be different colors instead of gradient - how can I do that?</p>