1

I am trying to fill two overlapped regions using fill and pattern. My problem is that the opacity option is not working in my example:

 \begin{figure}[ht!]
  \centering
   \begin{tikzpicture}[scale=0.85]
    \begin{axis}
        [ticks=none,
        ymin=0,ymax=1.7,
        xmin=0,xmax=1.7]      
    \addplot[pattern=dots,mark=*] coordinates {
                (0,0)
                (0,1.3)
                (1.1,1.1)
                (1.3,0)
                (0,0)   
    };
    \addplot[fill=green,fill opacity=0.2,mark=*] coordinates {
                (0,0)
                (0,1.3)
                (1.3,0)
                (0,0)    };
     \end{axis}
    \end{tikzpicture}
   \end{figure}   `

which produces the follwing figure:

enter image description here

I need to reduce the opacity of the green region.

tam
  • 537
  • It works for me. Which version of pgfplots do you use? Please try updating. –  Oct 04 '15 at 13:42
  • @HarishKumar I updated all the packages (in Miktex) but still have the same problem. For the pgfplots version, I found in the text file: Package: pgfplots 2015/05/02 v1.12.1 Data Visualization (1.12.1). – tam Oct 04 '15 at 14:19
  • I too have the same version but it works: http://i.stack.imgur.com/jQPX1.png Can you show the full code please. –  Oct 04 '15 at 14:23
  • Might also be a viewer issue. I know my slightly old version of evince doesn't always get this right, but double checked in Adobe Reader things look as they should. – daleif Oct 04 '15 at 14:26
  • I just found the source of this problem.. Actually it was because of the transparent package that I was putting in the preamble. Any idea why ? Anw thank you for your time! – tam Oct 04 '15 at 14:32
  • 1
    @tam That's why you need to write a full example in the question. :) You don't need this transparent package with pgfplots, you can remove it. – Alenanno Jun 17 '16 at 17:39
  • (I'm voting to close this question as duplicate because the debug part is done in the comment and the reason is given in @Heiko Oberdiek's asnwer) – Symbol 1 Apr 22 '17 at 21:01

1 Answers1

-2

i had the same error and could reduce it to the following package: fixmetodonotes. This interfered with transparency.

By adding

\usepackage{fixmetodonotes}

to the above example, transparency got lost.

Stefan Kottwitz
  • 231,401
Jinox
  • 1