# PGF: Externalize + Fadings differences in viewer [closed]

I've been working with the fadings library in PGF and I was having trouble getting it working with externalize.

I finally figured out that it was working, but Apple's Preview does not display the fadings when externalized. I opened the PDF with Adobe Acrobat and the fadings worked fine.

Has anyone else come across this or know if it's a bug in PGF or Apple's Preview?

Here's an example using \includegraphics and \pgfuseimage:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize
\begin{document}
% Three color triangles
\begin{tikzpicture}
\fill[green] (90:4) -- (210:4) -- (-30:4) -- cycle;
\fill[blue,path fading=west] (90:4) -- (210:4) -- (-30:4) -- cycle;
\fill[red,path fading=south] (90:4) -- (210:4) -- (-30:4) -- cycle;
\end{tikzpicture}
\includegraphics{\jobname-figure0.pdf}
\pgfdeclareimage{fig0}{\jobname-figure0.pdf}
\pgfuseimage{fig0}
\end{document}


Left is Adobe Acrobat, right is Apple Preview:

edit: Next is comparison between the above document in Preview and the externalized image also in Preview

-

## closed as off-topic by Joseph Wright♦Aug 10 '13 at 7:38

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This is fairly well known. Fadings do not work well with some pdf viewers. –  Jan Hlavacek Mar 9 '13 at 0:14
Thanks. However, I want to make clear that fadings does work in Preview, just not when externalized and re-imported. In fact, the standalone pdf will show up correctly in Preview and looks identical to the Acrobat rendering (I guess I should have included that comparison as well). –  Liam Mar 9 '13 at 18:52
[unrelated to question]: funny, I have just finished the documentation of pgfplots surface plots with explicitly given color (such as a surface patch with three corners and colors red, green, blue) pgfplots.sourceforge.net/pgfplots_unstable.pdf . The outcome of those patch shadings is identical to your overlaid fadings for this special case :) –  Christian Feuersänger Mar 9 '13 at 19:58
:) It is a nice looking triangle and a good addition to the pgfplots doc. I should have mentioned that the triangle I used is originally from texample.net/tikz/examples/rgb-triangle –  Liam Mar 9 '13 at 23:18
@Liam well, I added it to the pgfplots doc. However, the way pgfplots achieves this type of shading is substantially different. It would be done by means of \addplot coordinates { (90,4) [color=red] (210,4) [color=green] (-30,4) [color=blue] }; and a suitable set of options (taken from the manual). –  Christian Feuersänger Mar 10 '13 at 12:20