白色网格将 MATLAB 绘图保存为 EPS 或 PDF
每当我将 pcolor 或 quiver 图保存为 EPS 或 PDF 时,我都会看到这个微弱的白色网格,这似乎是某种渲染问题。第一张图片显示了问题,第二张图片显示了它在图形窗口中的外观。我只是使用“另存为”菜单项另存为 eps。关于如何获得漂亮的矢量图像有什么建议吗?我使用的是 OS X。
谢谢!
Whenever I save a pcolor or quiver plot as an EPS or PDF, I get this faint white grid that seems to be some sort of rendering problem. The first images shows the problem, the second one is how it looks in the figure window. I'm simply using the "Save As" menu item to save as an eps. Any suggestions on how I can get a nice looking vector image? I'm on OS X.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我可以在 Snow Leopard 上确认这个问题。将渲染设置为
opengl
并使用“另存为”菜单从箭袋图创建eps
文件确实解决了该问题。I can confirm the issue on Snow Leopard. Setting the render to
opengl
and using the 'Save As' menu to create aneps
file from a quiver plot did solve the issue.只需添加另一个解决方案:白线并不是真正的错误,而是 EPS/PDF 查看器的抗锯齿设置中的伪影。由于某种原因,Matlab 保存三角形而不是正方形,从而调用抗锯齿功能来拉直对角线。
如果将三角形替换为矩形,则伪像就会消失,如下所示
http://www.mathworks.com/matlabcentral/fileexchange/43271-pcolor -eps-fix
干杯
Just adding another solution: the white lines are not really errors but rather artifacts from the anti-aliasing settings of your EPS/PDF viewer. For some reason Matlab saves triangles instead of squares, thus invoking the anti-aliasing to straighten diagonal lines.
The artifacts disappear if triangles are replaced by rectangles as in
http://www.mathworks.com/matlabcentral/fileexchange/43271-pcolor-eps-fix
Cheers