我最近遇到了同样的问题这个帖子由于它似乎仍未解决,我想添加一些细节,希望有人能够提供帮助。
我使用 Mac(OS X 10.7.5)上的 pdftex 在 Texshop(版本 3.52)中创建了一个简单的 3D pgfplot 的 pdf。我使用选项“shader=interp”和“\addplot3[surf]”,如下图所示的 MWE 所示。
\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}
输出的 pdf 文件看起来不错,但是当打印通过 Texshop、Texworks 或 Preview,它会错过整个地图,也就是图中的所有颜色。请参见下方左侧的 PDF 在查看器中的外观以及右侧的打印外观。
我尝试使用不同的打印机并更新了 Texshop,但没有发现任何差异。此外,使用“TeX 和 DVI”选项编译 pdf 或通过“\pdfminorversion”更改 pdf 版本也无济于事。我只能在使用 Acrobat reader(版本 11.0.06)打印 pdf 文件或删除代码中的选项“shader=interp”时才能解决这个问题。但这两个选项都不令人满意。
提前致谢!
答案1
经过深入的分析和讨论,我得出结论,这是相关打印机驱动程序的一个错误。没有证据表明生成的 pdfpgfplots
已损坏。如果是的话,我很乐意解决这个问题。