title: How to use streamplot function when 1D data of x-coordinate, y-coordinate, x-velocity and y-velocity are available?
body: <p>A similar type of question has been asked in SO before, but I couldn't understand the answers provided there. Hence I am reposting the question again.I am new to this forum. So I apologize if I am violating any rules. </p>
  
  <p>I have obtained raw data in text format from my CFD simulation. I want to plot the stream function from this data. The matplotlib documentation for streamplot function mentions that "<strong>u, v : 2d arrays x and y-velocities. Number of rows should match length of y, and the number of columns should match x".</strong> This is the sample data from the text file </p>
  
  <pre><code>x            y         x-velocity   y-velocity
  1.48E+01    0.00E+00    0.00E+00    2.36E-01
  1.49E+01    0.00E+00    0.00E+00    2.36E-01
  1.51E+01    0.00E+00    0.00E+00    2.36E-01
  1.52E+01    0.00E+00    0.00E+00    2.36E-01
  1.54E+01    0.00E+00    0.00E+00    2.36E-01
  1.55E+01    0.00E+00    0.00E+00    2.36E-01
  1.57E+01    0.00E+00    0.00E+00    2.36E-01
  1.46E+01    1.52E-01    0.00E+00    0.00E+00
  1.48E+01    1.52E-01    1.13E-04    2.36E-01
  1.49E+01    1.52E-01    9.01E-05    2.36E-01
  1.51E+01    1.52E-01    3.81E-05    2.36E-01
  1.52E+01    1.52E-01    1.85E-13    2.36E-01
  1.54E+01    1.52E-01    3.81E-05    2.36E-01
  1.55E+01    1.52E-01    9.01E-05    2.36E-01
  1.57E+01    1.52E-01    1.13E-04    2.36E-01
  1.58E+01    1.52E-01    0.00E+00    0.00E+00
  1.46E+01    3.05E-01    0.00E+00    0.00E+00
  1.48E+01    3.05E-01    1.54E-04    2.36E-01
  1.49E+01    3.05E-01    1.18E-04    2.36E-01
  1.51E+01    3.05E-01    5.21E-05    2.36E-01
  1.52E+01    3.05E-01    3.92E-12    2.36E-01
  1.54E+01    3.05E-01    5.21E-05    2.36E-01
  1.55E+01    3.05E-01    1.18E-04    2.36E-01
  1.57E+01    3.05E-01    1.54E-04    2.36E-01
  1.58E+01    3.05E-01    0.00E+00    0.00E+00
  1.46E+01    4.57E-01    0.00E+00    0.00E+00
  1.48E+01    4.57E-01    1.85E-04    2.36E-01
  1.49E+01    4.57E-01    1.37E-04    2.36E-01
  1.51E+01    4.57E-01    6.28E-05    2.36E-01
  </code></pre>
  
  <p>This is the link where the entire text file is available. This data was obtained from an equally spaced grid. 
  <a href="https://www.dropbox.com/s/jywtp0ahz7p6m3k/AE1-3200.txt?dl=0" rel="nofollow">Text File</a>.
  If I just use the streamplot function with my current data, it shows up an exception'<strong>ValueError: 'u' and 'v' must be of shape 'Grid(x,y)</strong>. I am not sure how to proceed further. Do I have to use one of the interpolation methods available in scipy to get a 2D array of U and V velocities.</p>
  
  <p>I am really stuck. Could anyone please help me on this?</p>
  
  <p>Thank you,
  Pramod</p>