It's my first post. I solved it when writing this so I send it anyway in case it helps someone.

When compiled with pdflatex.exe from MiKTeX 2.7 it works. When compiled with pdflatex.exe from MiKTeX 2.9 the fill opacity property of \addplot also compiles without errors but when opened in a pdf reader, the reader returns error: pgf@ca0.5 blablabla.

To fix this problem (I don't know why) you should avoid using packages: pstricks, pst-node, pst-plot, pst-circ.

Here's my corrected code


%\usepackage{pstricks, pst-node, pst-plot, pst-circ}


\addplot [black,thick,ybar interval,fill=black,] 
    coordinates {(22.1,68.9) (44.2,74.4) (88.4,86.5)};

\addplot [blue,thick,ybar interval,fill=blue,fill opacity=.5] 
    coordinates {(22.1,78.9) (44.2,64.4) (88.4,86.5)};


Do you know why?

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. I see no problem with your code, apart from suprious ; after the legends, and the output is fine when I run in a pstricks compatible way. Which engine are you using? Have you seen tex.stackexchange.com/q/8413/15925? – Andrew Swann Apr 8 '14 at 7:03
  • Thanks Andrew. The problem (perhaps not in the code) is when uncomment the line: %\usepackage{pstricks, pst-node, pst-plot, pst-circ} using miktex 2.9 pdflatex (I am using texnic 1.0 to compile) – Ernesto Apr 10 '14 at 16:55
  • Ernesto, this issue is very, very probably not related to MiKTeX itself, but to the fact that in MiKTeX 2.7 you necessarily have older package versions of pgf/TikZ and PSTricks & co. – Speravir Apr 10 '14 at 23:57
  • My remarks about the output applied to when the line was uncommented. – Andrew Swann Apr 11 '14 at 9:32
  • Speravir: Thanks for the hint on versions (Miktex, pgf/Tikz and PSTricks). I put the label Miktex because it was how I (and perhaps others) identified the problem. It was hard, for me, to discover that the problem was in packages versions not in the compiler. – Ernesto Apr 12 '14 at 0:26

use it this way:


then it will work with pdflatex --shell-escape, latex->dvips->ps2pdf, and xelatex

  • good answer! I can not vote because "my reputation" < 15 – Ernesto Apr 10 '14 at 16:53

As I didn't use pstricks, pst-node, etc. but still experienced the same problem, I found the following answer to provide a fundamental explanation for the observed problem:

Tikz and ctable incompatibility, gives error when printing

In short, moving the following snippet in front of the remaining packages solved the problem of adobe reader reporting errors when viewing a pgfplot that made use of opacity:

%remaining packages

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.