Graphics, Figures & TablesOpacity Issues when externalizing tikzpicture

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
PaulRemo
Posts: 1
Joined: Sun May 22, 2016 9:32 pm

Opacity Issues when externalizing tikzpicture

Post by PaulRemo »

Hey all!
I have an issue when trying to externalize a tikzpicture. The working example consists of two files. The main file:

Code: Select all

\documentclass[oneside, 10pt]{scrreprt}

\usepackage{tkz-euclide,tikz-3dplot}
\usetikzlibrary{external}
\tikzexternalize

\begin{document}
\input{ellipse.tikz}
\end{document}[/latex]

and the ellipse.tikz file:

[latex]\newcommand{\asa}{2}
\newcommand{\bsa}{0.5}
\newcommand{\csa}{0.5}
% view angle
\tdplotsetmaincoords{85}{25}
%
\begin{tikzpicture}[scale=2,tdplot_main_coords,line join=bevel,fill opacity=.2]
    \pgfsetlinewidth{.1pt}
    \tdplotsphericalsurfaceplot[fill opacity=0.2]{72}{36}%
        {1/sqrt((sin(\tdplottheta))^2*(cos(\tdplotphi))^2/\asa+
        (sin(\tdplottheta))^2*(sin(\tdplotphi))^2/\bsa + (cos(\tdplottheta))^2/\csa)} % function defining radius
        {black} % line color
        {green} % fill
        {\draw[color=black,thick,->] (0,0,0) -- (2,0,0) node[anchor=north east]{$\varphi_1$};}% x-axis
        {\draw[color=black,thick,->] (0,0,0) -- (0,1.5,0) node[anchor=north west]{$\varphi_2$};}% y-axis
        {\draw[color=black,thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$\varphi_3$};}% z-axis
\end{tikzpicture}
When the file is set like this, the opacity in the ellipsoid is not visible, instead the shape appears to be opaque. When I leave out the \tikzexternalize command in the main file, however, the transparency shows.
Does anybody know the reason for this, and/or a possible fix?

help is greatly appreciated!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply