title: gnuplot: Is there a way to plot vertical lines spatially?
body: <p>I am trying to plot several vertical lines of a variable, say velocity (m/s), against a x-axis of distance (m) and a y-axis of height(m). Each of the velocity profiles come as a function of height measured at different locations. So the aim is to observe how these profiles change spatially.</p>
  <p>I have thought to approach this by shifting the vertical profiles by the x-component corresponding to the location where each profile was measured. So if we suppose that the second x-axis depicts velocity I want it to reset to 0 at every point of measurement.</p>
  <p>Sketch of desired outcome (ignoring black colour):
  <a href="https://i.stack.imgur.com/Swqea.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Swqea.jpg" alt="enter image description here" /></a></p>
  <p>Does anyone have any idea of what the right course of action would be? I am using <strong>gnuplot</strong> but any alternatives are welcome. Thanks in advance.</p>
  <p>EDIT:</p>
  <p>Below you may have a look at the data I use (file <em>verProfiles</em> in the code snippet)</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>z(m)</th>
  <th>U_1(m/s)*</th>
  <th>U_4(m/s)*</th>
  <th>U_8(m/s)*</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>0.50</td>
  <td>1.66</td>
  <td>1.82</td>
  <td>1.95</td>
  </tr>
  <tr>
  <td>0.75</td>
  <td>1.85</td>
  <td>2.04</td>
  <td>2.11</td>
  </tr>
  <tr>
  <td>1.00</td>
  <td>2.00</td>
  <td>2.20</td>
  <td>2.18</td>
  </tr>
  <tr>
  <td>1.25</td>
  <td>2.12</td>
  <td>2.34</td>
  <td>2.21</td>
  </tr>
  <tr>
  <td>1.50</td>
  <td>2.23</td>
  <td>2.36</td>
  <td>2.22</td>
  </tr>
  <tr>
  <td>1.75</td>
  <td>2.33</td>
  <td>2.37</td>
  <td>2.22</td>
  </tr>
  <tr>
  <td>2.00</td>
  <td>2.41</td>
  <td>2.38</td>
  <td>2.22</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>*The numbers 1, 4 and 8 in the names of U variables in the table above denote the location where the measurements are taken hence each U profile should start and the respective x point in the graph.</p>
  <p>The gnuplot code that I've written so far and generates a <strong>false</strong> graph is:</p>
  <pre><code>outName=&quot;U_test.png&quot;
  
  set terminal pngcairo font &quot;helvetica,20&quot; size 800, 1000
  set xtics nomirror
  set x2tics
  set xrange [0:10] noreverse nowriteback
  set autoscale x2fix
  set yrange [0:2.5]
  set grid
  set mxtics 4
  set mx2tics 4
  set mytics 4
  set key left top
  set key samplen 2
  set key spacing 0.75
  set xlabel  &quot;x&quot;
  set x2label &quot;Ux [m s^{-1}]&quot;
  set ylabel &quot;z&quot;
  set output &quot;$outName&quot;
  
  inp0=&quot;verProfiles&quot;
  
  plot \
      inp0 u 2:1 t &quot;U_1&quot; axes x2y1 w lp ps 2 lw 2 lc rgb &quot;#009E73&quot;, \
      inp0 u 3:1 t &quot;U_4&quot; axes x2y1 w lp ps 2 lw 2 lc rgb &quot;#3F8B77&quot;, \
      inp0 u 4:1 t &quot;U_8&quot; axes x2y1 w lp ps 2 lw 2 lc rgb &quot;#7EA99E&quot;
  </code></pre>
  <p>The generated false graph is:</p>
  <p><a href="https://i.stack.imgur.com/bxDOA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bxDOA.png" alt="enter image description here" /></a></p>