
答え1
pgfplots
マニュアルのセクション4.5を読み始める
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot[ycomb,scatter] table[x=x,y=y]{
y x
0 0
10 3
20 3
40 8
30 6
};
\end{axis}
\end{tikzpicture}
\end{document}