I'm trying to create a graph like this:
But I can only get it to look like this using legend text, but I want to put the text directly below the bar graphs (like 0ms, 50ms, 150ms)
My code:
\begin{figure}[ht]
\centering
\begin{tikzpicture}
\begin{axis}[
ybar,
bar width=20pt,
width=0.5\textwidth,
height=0.5\textwidth,
enlarge x limits=0.5, % dist between x bars
legend style={at={(0.5,-0.20)},anchor=north,legend columns=-1},
ylabel={Impact of latency on gameplay, 1-5},
symbolic x coords={Chess, Pong},
xtick=data,
ymin=1,ymax=5,
nodes near coords,
nodes near coords align={vertical},
]
\addplot coordinates {(Chess,1.1) (Pong,1.5)}; % 0ms results
\addplot coordinates {(Chess,1.6) (Pong,4.6)}; % 1000ms results
\legend{100ms delay,1000ms delay}
\end{axis}
\end{tikzpicture}
\end{figure}