# yticklabel in Thousands of pounds/dollars/euros pgfplots

I'd like to display the yticklabel as Thousands \euro or \pounds, but doesn't quite looks right, what do you think?

        \documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{pgfplots.units}
\usepgfplotslibrary{units}
\begin{document}

\begin{tikzpicture}
\begin{axis}[
title = {Optimalization based upon co-occurences},
xbar,
width=10cm,
change y base,
y SI prefix=kilo,y unit=Thousands,
xtick={1,...,5},
yticklabel={\pgfmathprintnumber{\tick}\pounds{}},
xticklabels={{Bloodstream infections (BSI)},{Surgical site infections (SSI)},{Ventilator-associated pneumonia (VAP)},{Urinary tract infections (UTI)},{Others}},
grid=major,
x tick label style={rotate=45,anchor=east},   ]

coordinates
{
(1, 36441   )+-(    207256  ,   2883    )
(2, 25546   )+-(    134602  ,   1783    )
(3, 9969    )+-(    12034   ,   7904    )
(4, 1006    )+-(    1361    ,   650 )
(5, 1000    )+-(    5000    ,   800 )

};
\end{axis}
\end{tikzpicture}
\end{document}


Would be nice if it looked like the graph below. Any suggestions? I see a siunitx library but no specific example around. Surely there is one...

-

it needs thousands adding somewhere...

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{units}

\usepackage[space-before-unit,range-units = repeat]{siunitx}
\begin{document}

\begin{tikzpicture}
\begin{axis}[
title = {Optimalization based upon co-occurences},
xbar,
width=10cm,
xtick={1,...,5},
xticklabels={{Bloodstream infections (BSI)},{Surgical site infections (SSI)},{Ventilator-associated pneumonia (VAP)},{Urinary tract infections (UTI)},{Others}},
grid=major,
x tick label style={rotate=45,anchor=east},
yticklabel={\pgfmathparse{(int(\tick))}\pounds{}\pgfmathresult},
ytick scale label code/.code={},
scaled y ticks=base 10:-3,
]

coordinates
{
(1, 36441   )+-(    207256  ,   2883    )
(2, 25546   )+-(    134602  ,   1783    )
(3, 9969    )+-(    12034   ,   7904    )
(4, 1006    )+-(    1361    ,   650 )
(5, 1000    )+-(    5000    ,   800 )

};
\end{axis}
\end{tikzpicture}
\end{document}

-
Very nice! thanks! y unit=Thousands, This just looks about passable, but it has []around it... Incidentally the error bars don't quite look right. They are supposed to be assymetric. Do the two right most columns of data not represent this? –  HCAI Mar 19 '13 at 22:23
@user1134241 I have no idea about tikz or pgf, I just stole some plausible looking keys from random searches:-) –  David Carlisle Mar 19 '13 at 22:25
@user1134241 I'm not sure but as far as I know the asymmetric error bars are not supported off-the-shelf. It's kind of understandable since as long as you are inside the region it doesn't matter where the bar ends. If you have an expected value and a nonuniform distribution then this might not be a good choice to display that information. –  percusse Mar 19 '13 at 22:28
@percusse what im actually trying to display the range of the data by using errorbars. Would you suggest a different way to display this? –  HCAI Mar 19 '13 at 23:24