title: R and ggplot: shade the color of the categorical variable
body: <p>I would like to make a graph that represents the frequency of an event per hour of each day of the week. How do I change the color of the day of the week? I would like to switch from black to red to the proximity of the weekend</p>
  
  <pre><code>  weekday_hour_pickup &lt;- my_data %&gt;%
        mutate(hour_pick = hour(new_pickup))%&gt;%
        group_by(hour_pick, weekday) %&gt;%
        count() %&gt;%
        ggplot(aes(hour_pick, n, color = weekday)) +
        geom_line(size = 1.5) +
        labs(x = "hour of the day", y = "count")
  
    plot(weekday_hour_pickup)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/TlBUT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TlBUT.png" alt="enter image description here"></a></p>