title: How to add legend and table with data value into a chart with different lines using ggplot2
body: <p>I have this data</p>
  
  <p><code>TX_growth&lt;-data.frame(year=c(2017,2016, 2015),statewide=c(61, 62,57),black=c(58,58,53),hispanic=c(59,60,55),white=c(65,64,61))</code></p>
  
  <p>Until now I have this chart using the following code:</p>
  
  <p><a href="https://i.stack.imgur.com/7GBL8.png" rel="nofollow noreferrer">My chart until now</a>
  <a href="https://i.stack.imgur.com/cm8SG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cm8SG.png" alt="enter image description here"></a></p>
  
  <pre><code>    ggplot() + geom_line(data = TX_growth, aes(x=year, y= statewide), color = "blue", size=1) + 
      geom_line(data = TX_growth, aes(x=year, y= white), color = "red", size=1) + 
      geom_line(data = TX_growth, aes(x=year, y= black), color = "green", size=1) + 
      geom_line(data = TX_growth, aes(x=year, y= hispanic), color = "orange", size=1) + 
      labs(title = "Figure 1: Statewide Percent who Met or Exceeded Progress", 
           subtitle = "Greater percentage means that student subgroup progressed at higher percentage than previous year.", 
           x = "Year", y = "Percentage progress")+ theme_bw() + 
      scale_x_continuous(breaks=c(2017,2016,2015)) 
  </code></pre>
  
  <p>I want to add (a) legend showing the name and color of each line and (b) a table below with all values of my dataframe. Something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/k8rNp.gif" rel="nofollow noreferrer">What I want</a>
  <a href="https://i.stack.imgur.com/sz9s2.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sz9s2.gif" alt="enter image description here"></a>
  Instead of cities, my chart would have "Statewide", "White", "Black", and "Hispanic". Also, my table would have years (from 2015 to 2017), rather than months. I don't want the seasons or "freezing" line. I just want to add the legend and table like they did it.</p>