title: Adding pattern based numbers on x axis in gnuplot
body: <p>I have data only for the y-axis in 30 bins. I want to plot via Gnuplot by adding the x-axis in the Gnuplot script. Range for x-axis is [-5,2] with 30 bins. How can I add a pattern or formula-based numbers on the x-axis? Or can I add this pattern for the x-axis in the data file itself using any grep command?</p>
  <p>Data for &quot;file1.txt&quot; (for example) is as follows;</p>
  <pre><code>0.000000e+00
  0.000000e+00
  1.936836e+01
  1.347826e+02
  2.204809e+02
  3.531409e+02
  4.656366e+02
  6.431357e+02
  8.020624e+02
  ----
  ----
  ---- up to 30 bins
  </code></pre>
  <p><strong>Outline for Gnuplot script is as follows;</strong></p>
  <pre><code>set style line 1 dt 1 lc rgb &quot;black&quot; lw 2 pt 1 ps default
  set style line 2 dt 2 lc rgb &quot;black&quot; lw 5 pt 1 ps default
  
  pl 'file1.txt' u ($0):($1) w l smooth bezier ls 1 title &quot;title1&quot;,\
     'file2.txt' u ($0):($1) w l smooth bezier ls 2 title &quot;title2&quot;
  </code></pre>