title: How do I plot a cross correlation matrix for timeseries?
body: <p>I have a timeseries representation of my data as follows (without the row and column) annotations:</p>
  
  <pre><code>      L1 L2 L3 L4
  t=1    0  1  1  0
  t=2    0  1  1  1
  t=3    1  0  1  1
  t=4    0  1  1  0
  </code></pre>
  
  <p>I am reading this into R as:</p>
  
  <pre><code>timeseries = read.table("./test", header=F)
  </code></pre>
  
  <p>I am plotting timeseries for L1 using</p>
  
  <pre><code>ts.plot(timeseries$V1)
  </code></pre>
  
  <p>and plotting the cross-correlation function as:</p>
  
  <pre><code>ccf(timeseries$V1, timeseries$V2)
  </code></pre>
  
  <p>Now, can someone please tell me how do I plot a cross correlation matrix that shows the output of this function for L1-L4? Basically, something like this (in my case, a 4x4 matrix of plots):</p>
  
  <p><img src="https://i.stack.imgur.com/KG0UE.gif" alt="enter image description here"></p>