import matplotlib.pyplot as plt
In [12]: x = [1,2,3,4,5]
In [13]: plt.hlines(0, xmin=min(x)-1, xmax=max(x)+1)
Out[13]: <matplotlib.collections.LineCollection at 0x285dee7def0>
In [14]: plt.scatter(x, [0] * len(x), c="orange", s=50)
Out[14]: <matplotlib.collections.PathCollection at 0x285dee0c860>
例子: