latex - Tikz axis chart outer columns cut off -


the outer columns of following charts cut off although diagram wide enough (axis line style). setting diagram's width not either. idea? need set or enlarge when increase bar width?

\begin{tikzpicture}     \begin{axis}[     ybar,      bar width=0.6cm,     tick align=inside,     major grid style={draw=white},     enlarge y limits={value=.1,upper},     ymin=0, ymax=100,     axis x line*=bottom,     axis y line*=right,     hide y axis,axis line style={shorten >=-15pt, shorten <=-15pt},     symbolic x coords={total, women, men},     xtick=data,     nodes near coords={\pgfmathprintnumber[precision=0]{\pgfplotspointmeta} }     ]     \addplot [draw=none, fill=blue!30] coordinates {         (total,75.4064)         (women, 72.7961)          (men,94.4597) };     \addplot [draw=none,fill=red!30] coordinates {         (total,75.4064)         (women, 89.7961)          (men,94.4597) };     \addplot [draw=none, fill=green!30] coordinates {         (total,75.4064)         (women, 89.7961)          (men,94.4597) };     \legend{}     \end{axis} \end{tikzpicture} 

enter image description here

you increase width , reduce space between bar groups (enlarge x limits=0.25):

\begin{tikzpicture}     \begin{axis}[     ybar,      bar width=0.6cm,     enlarge x limits=0.25,     width=\textwidth,     tick align=inside,     major grid style={draw=black},     enlarge y limits={value=.1,upper},     ymin=0, ymax=100,     axis x line*=bottom,     axis y line*=right,     hide y axis,axis line style={shorten >=-15pt, shorten <=-15pt},     symbolic x coords={total, women, men},     xtick=data,     nodes near coords={\pgfmathprintnumber[precision=0]{\pgfplotspointmeta} }     ]     \addplot [draw=none, fill=blue!30] coordinates {         (total,75.4064)         (women, 72.7961)          (men,94.4597) };     \addplot [draw=none,fill=red!30] coordinates {         (total,75.4064)         (women, 89.7961)          (men,94.4597) };     \addplot [draw=none, fill=green!30] coordinates {         (total,75.4064)         (women, 89.7961)          (men,94.4597) };     \legend{}     \end{axis} \end{tikzpicture} 

enter image description here


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -