Even if the surf graph is converted to emf, the image quality is not good.
40 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/802189/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/802194/image.png)
I converted the surf plot graph into an emf file. But the quality is not good. However, if you convert another 2-d graph into an emf file, the image quality is good. What should I do?
0 个评论
回答(1 个)
Richard Quist
2021-12-17
When generating vector output (such as EMF or PDF files, or when copying EMF or PDF to the clipboard) MATLAB uses a heuristic to determine how to export the content. In your specific case I would guess that the heuristic has chosen to embed the surface plot as an image. You can override the heuristic by doing one of the following:
% Assuming fig is the handle to the figure you are trying to save...
% set the figure's Renderer property to 'painters' before using File->Save As:
set(fig, 'Renderer', 'painters');
% In R2020a and later, use the exportgraphics command and specify the 'ContentType' as 'vector':
exportgraphics(fig, 'output.emf', 'ContentType', 'vector');
% use the print command and include the '-painters' option:
print(fig, 'output.emf', '-painters');
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!