Posts tagged ‘plotting’
This is different from a bar chart, since in a bar chart the bars have width.
The vlines function will do what you want this takes arrays for its various values.
import pylab pylab.vlines([1,2,3,4,5], 0, [2,4,6,8,10]) pylab.show()
Matplotlib’s pyplot library has the following functions for drawing lines:
The relevant plot in the gallery is here: