消除条形图中过多的间距

消除条形图中过多的间距

如何消除条形图左右两侧的间距?

\documentclass[12pt]{report}
\usepackage{pgfplots}
\usepackage{tikz}

\begin{document}
\begin{figure}
\begin{tikzpicture}
    \begin{axis}[
        scaled y ticks = false,
        yticklabel style={/pgf/number format/fixed},
        %width  = 2.85*\textwidth,
        height = 8cm,
        ybar=1*\pgflinewidth,
        bar width=5pt,
        ylabel = {y-axis},
        symbolic x coords={A,B,C},
        xtick = data,
    %nodes near coords,
    %nodes near coords align={vertical},
        %enlarge x limits=2,
    ymin=0 
    ]
        \addplot[style={mark=none}]
            coordinates {(A, 0.0078)(B, 0.0059)(C, 0.00089)};

        \addplot[style={mark=none}]
            coordinates {(A,0.0356)(B,0.0332)(C,0.0328)};

    \end{axis}
\end{tikzpicture}
\end{figure}
\end{document}

在此处输入图片描述

相关内容