Plot or reshape 2D array matplotlib
<p>i have no idea how can i plot scatter with a 2D array of this type:</p>

<pre><code>a=[[x0,t0],[x1,t1],...,[xn,tn]]
</code></pre>

<p>the plot should be x vs t, maybe instead of doing this with a maplotlib routine be able to reshape a to obtain:</p>

<pre><code>a=[[x0,x1,...,xn],[t0,t1,...,tn]]
</code></pre>

<p>thanks!</p>

<p>Assuming your data starts in the format a = [[x0, t0]]: </p>

<p>Split x &amp; t into separate lists, then you can pass them into matplotlib.</p>

<pre><code>import matplotlib.pyplot as plt
x = [i[0] for i in a]
t = [i[1] for i in a]
plt.plot(x, t)
</code></pre>

python numpy matplotlib