1

I am trying to have a transparent fill as well as set the total transparency of the shape. The bottom example should be a combination of the two above. How can I manipulate the transparency value of the overall shape containing fading=...? Thank you in advance!

EDIT: I was viewing the output on VS Code using LaTeX Workshop (by James Yu). Switching to Adobe Acrobat Reader renders the output perfectly. Thank you hpekristiansen for the answer and suggesting to use a different viewer.

Output

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fadings}

\begin{document}
\begin{tikzpicture}
    \begin{scope}
        \node at (2, 1.5){Only \verb|fill opacity|};
        \filldraw[fill=blue,fill opacity=0.01](0,0) circle (1cm);
        \filldraw[fill=blue,fill opacity=0.50](2,0) circle (1cm);
        \filldraw[fill=blue,fill opacity=1.00](4,0) circle (1cm);
    \end{scope}
    \begin{scope}[yshift=-4cm]
        \node at (2, 1.5){With \verb|path fading=south|};
        \filldraw[fill=blue,path fading=south](0,0) circle (1cm);
        \filldraw[fill=blue,path fading=south](2,0) circle (1cm);
        \filldraw[fill=blue,path fading=south](4,0) circle (1cm);
    \end{scope}
    \begin{scope}[yshift=-8cm]
        \node at (2, 1.5){With \verb|path fading=south| and \verb|fill opacity|};
        \filldraw[fill=blue,fill opacity=0.01,path fading=south] (0,0) circle (1cm);
        \filldraw[fill=blue,fill opacity=0.50,path fading=south] (2,0) circle (1cm);
        \filldraw[fill=blue,fill opacity=1.00,path fading=south] (4,0) circle (1cm);
    \end{scope}
\end{tikzpicture}
\end{document}
1
  • Your last one doesn't have a path fading applied to the paths. It's the same as the first. Mar 20, 2023 at 19:26

1 Answer 1

1
\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{fadings}
\begin{document}
\begin{tikzpicture}
\node at (2, 1.5){With \verb|path fading=south| and \verb|fill opacity|};
\filldraw[fill=blue, path fading=south, fill opacity=0.01] (0,0) circle[radius=1cm];
\filldraw[fill=blue, path fading=south, fill opacity=0.50] (2,0) circle[radius=1cm];
\filldraw[fill=blue, path fading=south, fill opacity=1.00] (4,0) circle[radius=1cm];
\end{tikzpicture}
\end{document}

Three bluish circles with fades

5
  • Thank you for the answer, I do apologize for the misunderstanding as I have updated the question. Unfortunately, I have ran your code and it didn't produce the output you have. In my output, your right circle is shown for all of the three circles. Based on \pgfversion, my current TikZ version is 3.1.10. Mar 20, 2023 at 19:49
  • Try an other viewer. You need to give information on your system. Is your LaTeX installation up to date? How do you compile? What viewers have you tried? Mar 20, 2023 at 19:59
  • Yes! Trying another viewer worked! I was viewing the rendering using VS Code with LaTeX Workshop (by James Yu) but opening it in Adobe Acrobat Reader rendered it perfectly. May I ask when should I keep in mind using different viewers? Only when dealing with transparency? Mar 20, 2023 at 20:05
  • Different viewers support different subsets of the pdf standard often problems can come from transparency, shades, fades, bleed through, layers, very thin lines, …. There is no way to know except of trying. Mar 20, 2023 at 20:40
  • Thank you for the response! Mar 20, 2023 at 21:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .