TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a bar plot which print the number next to the bar. The text is however not very well readable due to the color applied to it.

Therefore I would like to know how to modify its style.

\usepackage{pgfplots, pgfplotstable}


\pgfplotstableread[header=false, col sep=comma]{ % Read data table. 
% First row doesn't have column names, hence the "header=false"
1, first item
5, second item

    ,bar width=2ex, y=3ex
    ,nodes near coords 
    ,nodes near coords align={horizontal} 
    % my approach:
    ,every node near coords/.append style={color=red}
    ,enlarge y limits={abs=0.75}
    ,ytick={data} % (\empty,data,{coordinate list})
    ,yticklabels from table={\datatable}{1}
  \addplot table [
    y expr=-\coordindex, % Use negative coordinate index as y coordinate
    x index=0 % Use first column as x coordinate
  ] {\datatable};

share|improve this question

closed as too localized by Jake, Claudio Fiandrino, zeroth, yo', percusse Feb 21 '13 at 12:35

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Small typo: The style is called every node near coord. – Jake Feb 20 '13 at 21:54