1
$\begingroup$

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

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: enter image description here

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?

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – yohbs May 10 '17 at 18:32
  • $\begingroup$ Also, I cannot reproduce your problem on Mathematica 11 running on a Mac. $\endgroup$ – yohbs May 10 '17 at 18:33
  • $\begingroup$ 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. $\endgroup$ – Xavier_B May 10 '17 at 18:58
  • $\begingroup$ 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. $\endgroup$ – Xavier_B May 11 '17 at 11:06
  • $\begingroup$ A 2D graph is correctly exported in scalar form. Why can't a 3D one? $\endgroup$ – Xavier_B May 11 '17 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.