0
私は棒グラフのバーの上にテキストラベルを貼りたいと思います。それらのためのスペースを作るために、私はenlarge limits
を使用しようとしますが、それは私の全体のプロットをシフトし、底を切り取っているように見えます。どうすればこの問題を解決できますか?Tikzpicture:プロットの反対側を拡大表示します
オリジナルのプロットと行番号がenlarge y limits
のものをコメントに付けました。
\begin{tikzpicture}
\begin{axis}[
xlabel = {loss},
ylabel = {probability},
enlarge x limits=0.2,
%enlarge y limits={rel=0.2,upper},
bar width = 16pt,
width=14cm,
height=8cm,
xtick=data]
\addplot[ybar,fill=white] coordinates {(-10,0.9) (0,0.095) (95,0.005)};
\node[above] at (axis cs:-10,0.9) {$90\%$};
\node[above] at (axis cs:0,0.095) {$9.5\%$};
\node[above] at (axis cs:95,0.005) {$0.5\%$};
\end{axis}
\end{tikzpicture}
\end{figure}