# Exporting to pdf or svg a 3DPlot changes the color function

I generated a 3D plot with some shades for the z coordinate in Mathematica 11.0. The result is :

However, when I export it as svg or as pdf I get a picture in shades of green only. Moreover, it is clear that neither the pdf nor the svg graphs are vectorial. I use the following commands:

Export["KGraph.pdf", KGraph, "PDF"]
Export["KGraph.svg", KGraph, "SVG"]


The result is similar to this:

The code to generate the plot is:

KGraph = Plot3D[K1[t, q], {t, 0, 10}, {q, 684123, 750000},
LabelStyle -> Directive[FontFamily -> "Arial", FontSize -> 12],
AxesLabel -> {"t", "q", "K(t,q)         "},
ColorFunction -> Function[{x, y, z}, Hue[.65 (1 - z)]]]


How can I ensure that the exported graphic is (a) in vectorial format, (b) uses the right colors?

• Your code does not specify the definition of K1, but that is not important because the problem probably pertains regardless of what K1 is. Next time please try to give a minimal working example. – yohbs May 10 '17 at 18:32
• Also, I cannot reproduce your problem on Mathematica 11 running on a Mac. – yohbs May 10 '17 at 18:33
• Try with any function which has two variables. The MWE working example you mention would not require that I specify a function at all. I add that in the previous version of Mathematica I had (Mathematica 9.0) all the exported images in pdf or svg were in scalar form. – Xavier_B May 10 '17 at 18:58
• I reproduced the same problem on another computer under Win7 x64 with Mathematica 11.0.0, except that this time the color was all yellow. When I try shades of Grey, I get a completely black graph. – Xavier_B May 11 '17 at 11:06
• A 2D graph is correctly exported in scalar form. Why can't a 3D one? – Xavier_B May 11 '17 at 11:18