title: R matplot() function: how to keep the indices on the x-axis but only plot specific values from the matrix
body: <p>So let's say you have a vector</p>
  <pre><code>a = c(1:10)
  </code></pre>
  <p>But I only want to plot element 2,5 and 7, but at indices 2, 5 7. Not: y values 2,5 and 7 at x values 1,2,3</p>
  <p>I can use:</p>
  <pre><code>plot(a[c(2,5,7)],a[c(2,5,7)])
  
  plot_subset_ind
  </code></pre>
  <p>However, for the function <code>matplot()</code>, when plotting a matrix, I don't know how to do this:</p>
  <p>original:</p>
  <pre><code>matplot(t(max_invest_year_zero_matrix/1000))
  </code></pre>
  <p>not-working because all data is shifted one index:</p>
  <pre><code>matplot(t(max_invest_year_zero_matrix[,plot_subset_ind]/1000))
  </code></pre>
  <p>Maybe I should replace the non-plotted values with NaN values.</p>