title: Plot pixels time series
body: <p>I'm trying to create an interactive plot of a raster brick, whereby clicking on a pixel gives you a time series of data at that pixel. (My raster brick is about 345 image.)</p>
  
  <p>This is what I did:</p>
  
  <pre><code>library(raster)
  
  EVI &lt;- "D:\\Modis_EVI\\Original\\EVI_Stack_single5000.tif"
  y.EVI &lt;- brick(EVI)
  plot(as.numeric(click(y.EVI)), type="l", lwd=2)
  </code></pre>
  
  <p>But it does not plot at all. And when i try with a smaller stack like 4 images only it gives this error:</p>
  
  <pre><code> Error in plot.window(…) : need finite 'xlim' values
  </code></pre>
  
  <p>Any advice please?</p>