Латексная гистограмма

Латексная гистограмма

Я не понимаю, почему этот код выдает мне только первые 2 такта, а не все 3. Остальное форматирование идеально, просто оно неполное.

Что мне нужно изменить?

\begin{figure}
    \centering
\begin{tikzpicture}
\begin{axis}[
    xlabel=Utterance Type,
    ylabel=Frequency,
    symbolic x coords={Question, Statement, Uncertain},
    xtick = data
    enlargelimits=1,
    ybar interval=0.4,
    ]
\addplot coordinates {(Question,4073) (Statement,8541) (Uncertain,2044)};
\end{axis}
\end{tikzpicture}\caption{Overall Responses by Utterance Type}\label{Overall}
\end{figure}

решение1

Вероятно, следующее ближе к тому, чего вы хотите добиться:

введите описание изображения здесь

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}

\begin{document}
\begin{figure}
    \centering
\begin{tikzpicture}
\begin{axis}[
    xlabel=Utterance Type,
    ylabel=Frequency,
    symbolic x coords={Question, Statement, Uncertain},
    xtick = data,
    ybar,
    bar width=20pt,
    ]
\addplot coordinates {(Question,4073) (Statement,8541) (Uncertain,2044)};
\end{axis}
\end{tikzpicture}\caption{Overall Responses by Utterance Type}\label{Overall}
\end{figure}

\end{document}

Связанный контент