mgieseki / dvisvgm

A fast DVI, EPS, and PDF to SVG converter
https://dvisvgm.de
GNU General Public License v3.0
295 stars 28 forks source link

3D plots in PDFs generated with `interp` shading disappear from SVG #265

Closed rlkamalapurkar closed 3 months ago

rlkamalapurkar commented 3 months ago

I generated a PDF file using

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
    \begin{tikzpicture}
        \begin{axis}
            \addplot3[ surf, shader=interp, samples=10, domain=0:1, ]{x^2*y};
        \end{axis}
    \end{tikzpicture}
\end{document}

and converted it to SVG using dvisvgm --pdf document.pdf. The resulting SVG file only has the axis lines, but the surface plot is gone.

mgieseki commented 3 months ago

dvisvgm doesn't support shading patterns as used for PDF gradient fills. So it's currently not possible to fully convert PDF or EPS files that contain these kind of patterns.