How do you plot a graph evolving over time?
<p>I have data about a network showing edges and nodes such as:</p>

<pre><code>    edges = ...
    [5  7   1;
    5   7   2;
    5   11  2;
    5   7   3;
    5   11  3;
    5   16  3;
    5   7   4;
    5   11  4;
    5   16  4;
    5   21  4];
</code></pre>

<p>I'd like to obtain multiple different plots based on how those edges evolve because those edges are the result of a long observation (e.g. one year).</p>

<p>Each edge occurs at a different moment and therefore, I'd like to get those six different plots separately.</p>

<p>Suppose, the first month I see these edges:</p>

<pre><code>    edges = ...
    [5  7   1];
</code></pre>

<p>And in the second month, I see this:</p>

<pre><code>    edges = ...
    [5  7   2;
    5   11  2;];
</code></pre>

<p>And month by month, more edges are added until the complete data set show above is obtained.</p>

<p><strong>EDIT</strong></p>

<p>The third column is the moment identifier and using this article (<a href="https://stackoverflow.com/questions/14341523/filter-matrix-by-some-column-value">Filter Matrix by some column value</a>
) I can loop through the matrix and obtain a filtered_edges to use in the graph() function.</p>

<p><strong>END EDIT</strong></p>

<p>The easy way would be to create different edges files and read them one by one, but is there a way to do this programmatically with Matlab?</p>