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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply