1

I recently encountered the same problem as in this post and since it still seems to be unsolved, I wanted to add a few details to it hoping that someone can help.

I create a pdf in Texshop (Version 3.52) with pdftex on my Mac (OS X 10.7.5) of a simple 3D pgfplot. I use the option 'shader=interp' and '\addplot3[surf]' as shown in the MWE shown below.

\documentclass[tikz]{standalone}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
    \begin{axis} [
      colormap/jet,
      shader=interp,
      mesh/ordering=x varies,
      mesh/cols=13,
      view={0}{90}
      ]
      \addplot3[surf] coordinates {
(-6,-6,446.788)  (-5,-6,423.361)  (-4,-6,413.264)  (-3,-6,402.349)
(-2,-6,388.948)  (-1,-6,391.747)  (0,-6,386.874)  (1,-6,423.778)  
(2,-6, 439.19)  (3,-6,449.074)  (4,-6,462.155)  (5,-6,484.399)  
(6,-6,505.412) (-6,-5, 423.48)  (-5,-5,392.382)  (-4,-5,406.696)
(-3,-5,392.592)  (-2,-5,371.158)  (-1,-5,384.142)  (0,-5,394.666) 
(1,-5,408.105)  (2,-5, 422.51)  (3,-5,420.173)  (4,-5,445.816) 
(5,-5,464.731)  (6,-5,485.349) (-6,-4,402.646)  (-5,-4,371.879) 
(-4,-4,376.239)  (-3,-4,396.874)  (-2,-4,382.761)  (-1,-4,386.665)  
(0,-4,397.148)  (1,-4,410.875)  (2,-4,425.998)  (3,-4,385.143)   
(4,-4,420.458)  (5,-4,438.432)  (6,-4,    458)  (-6,-3,423.219)  
(-5,-3,370.582)  (-4,-3,464.786)  (-3,-3,443.921)  (-2,-3,425.196)  
(-1,-3,427.138)  (0,-3,438.002)  (1,-3, 453.97)  (2,-3,473.021)  
(3,-3,418.583)  (4,-3,435.887)  (5,-3,414.993)  (6,-3,475.148)
(-6,-2,401.995)  (-5,-2,385.612)  (-4,-2,438.956)  (-3,-2,418.583)   
(-2,-2,400.093)  (-1,-2,400.773)  (0,-2, 410.58)  (1,-2,426.024)
(2,-2, 444.92)  (3,-2,397.131)  (4,-2,413.739)  (5,-2,431.741)  
(6,-2,451.267)  (-6,-1,382.978)  (-5,-1,335.274)  (-4,-1,416.598)
(-3,-1,396.718)  (-2,-1,378.348)  (-1,-1,377.455)  (0,-1,32.0089)  
(1,-1,400.683)  (2,-1,419.918)  (3,-1,377.371)  (4,-1,393.286)  
(5,-1,374.648)  (6,-1,429.077) (-6, 0,365.902)  (-5, 0,350.965)
(-4, 0,397.527)  (-3, 0, 378.36)  (-2, 0,360.454)  (-1, 0,358.447)
(0, 0,    363)  (1, 0,381.147)  (2, 0,401.177)  (3, 0,362.155)
(4, 0,378.174)  (5, 0,395.513)  (6, 0, 414.34) (-6, 1,372.511)
(-5, 1,326.945)  (-4, 1,407.215)  (-3, 1,388.646)  (-2, 1,371.945)
(-1, 1,371.003)  (0, 1,380.027)  (1, 1,396.414)  (2, 1,416.602)
(3, 1,374.897)  (4, 1,391.276)  (5, 1, 373.32)  (6, 1,428.284)
(-6, 2,391.149)  (-5, 2,376.191)  (-4, 2,406.941)  (-3, 2,369.633)
(-2, 2,393.583)  (-1, 2,394.184)  (0, 2,404.263)  (1, 2,420.588)
(2, 2,  440.5)  (3, 2,416.631)  (4, 2,374.948)  (5, 2,391.855)
(6, 2,418.511)  (-6, 3,375.967)  (-5, 3,361.698)  (-4, 3,357.421)
(-3, 3,368.273)  (-2, 3,377.106)  (-1, 3,378.664)  (0, 3,369.175)
(1, 3, 382.42)  (2, 3,397.821)  (3, 3,377.942)  (4, 3,384.944)
(5, 3,387.862)  (6, 3,424.429)  (-6, 4,396.478)  (-5, 4,381.554)
(-4, 4,376.162)  (-3, 4,388.843)  (-2, 4,375.881)  (-1, 4,378.384)
(0, 4, 355.14)  (1, 4,403.654)  (2, 4,419.779)  (3, 4,398.599)
(4, 4,407.113)  (5, 4,426.715)  (6, 4,448.245)  (-6, 5,409.364)
(-5, 5,380.492)  (-4, 5,387.843)  (-3, 5,360.034)  (-2, 5, 362.23)
(-1, 5,364.909)  (0, 5,358.321)  (1, 5,363.226)  (2, 5,379.325)
(3, 5,397.152)  (4, 5,410.086)  (5, 5,433.909)  (6, 5,460.548)
(-6, 6, 423.99)  (-5, 6,408.967)  (-4, 6,400.475)  (-3, 6,372.922)
(-2, 6,371.116)  (-1, 6, 373.92)  (0, 6,384.778)  (1, 6,  398.8)
(2, 6, 415.62)  (3, 6,420.127)  (4, 6,436.064)  (5, 6,461.957)  
(6, 6,491.123)
    };
\end{axis}
\end{tikzpicture}     
\end{document}

The output pdf file looks ok but when printed via Texshop, Texworks or Preview it misses the entire map, that is to say all the colors in the plot. See below on the left what the pdf looks like in a viewer and how it looks when it is printed out on the right.

I tried to use different printers and updated Texshop but saw no difference. Furthermore, using the 'TeX and DVI' option to compile the pdf or changing the pdf version via '\pdfminorversion' did not help either. I can only solve it when using Acrobat reader (Version 11.0.06) to print the pdf file or removing the option 'shader=interp' in the code. But both options are unsatisfying.

Thanks in advance!

  • So the only document viewer that prints correctly on MacOS X is Adobe Reader? All the others produce a blank void? – moewe Aug 17 '15 at 13:55
  • Also: Welcome to TeX.SX! – moewe Aug 17 '15 at 13:56
  • Yes, I have tried Texshop, Texworks, Preview and Adobe Reader and only the latter pdf viewer prints correctly. And by the way, opening the pdf file with Adobe Illustrator CS5 and saving it again fixes the problem but messes up the font and is cumbersome. – andiman Aug 17 '15 at 14:07
  • @andiman just for the records: I add the link of your bug submission here sourceforge.net/p/pgfplots/bugs/92 – Christian Feuersänger Sep 8 '15 at 16:23
1

After intensive analysis and discussion, I come to the conclusion that this is a bug in the involved printer driver. There is no evidence that the pdf generated by pgfplots is corrupt. If it would be, I would happily address the issue.

Please refer to https://sourceforge.net/p/pgfplots/bugs/92 for details.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.