Search code examples
gnuplot

How do I draw a set of vertical lines in gnuplot?


E.g. if I have a graph and want to add vertical lines at every 10 units along the X-axis.


Solution

  • Here is a snippet from my perl script to do this:

    print OUTPUT "set arrow from $x1,$y1 to $x1,$y2 nohead lc rgb \'red\'\n";
    

    As you might guess from above, it's actually drawn as a "headless" arrow.