I'd like to format the nodes in this bar chart with $ signs (e.g $275). (The sets of bars could also be closer together; perhaps that should be another question.)
The answer is probably out there somewhere but my searches haven't found it.
Here's my MWE:
%http://tex.stackexchange.com/questions/88892/pgfplots-bar-plot-spacing-inbetween-bars
%http://tex.stackexchange.com/questions/113241/pgfplots-grouped-bar-chart-from-file
%http://tex.stackexchange.com/questions/35872/multiline-coords
\documentclass{standalone}
\usepackage{tikz,pgfplots}
\usepackage{pgfplotstable}
\usetikzlibrary{calc,decorations.pathmorphing}
%deal with warning message in log
\pgfplotsset{compat=1.8}
\usepackage{helvet}
\usepackage[eulergreek]{sansmath}
\begin{document}
\newcommand{\mywidth}{12cm}
\newcommand{\myheight}{5cm}
\pgfplotstableread[col sep=comma]{
seats, 2003, 2008
ordinary, 42.26, 52.16
premium, 275, 325
}\ticketprices
\begin{tikzpicture}[font=\sffamily\sansmath]
\begin{axis}[
ybar=10pt,
bar width=20pt,
ymin=0,
tick style={draw=none},
width=\mywidth, height=\myheight,
title={Tickets at Fenway Park},
hide y axis,
axis x line*=bottom,
xtick=data,
xticklabel style={align=center},
xticklabels={
2003 2008\\
ordinary seats,
2003 2008\\
premium seats
},
nodes near coords,
]
\addplot [fill=gray] table[x expr=\coordindex, y=2003] {\ticketprices};
\addplot [fill=black] table[x expr=\coordindex, y=2008] {\ticketprices};
\end{axis}
\end{tikzpicture}
\end{document}
nodes near coords={\$\pgfmathprintnumber...
;)