MATLAB generated .eps 3D figure import to Latex will be blurry
29 次查看(过去 30 天)
显示 更早的评论
Hi,
I try to import .eps figures generated by MATLAB to Latex, it works fine for 2D plots: by fine I mean no matter how much I zoom in the resulting pdf files from Latex, the plot will automatically adjust, all the lines, words, colors stay crystal clear. But when I follow the same way importing 3D figure (e.g., like attached), it does not have this quality: when I zoom in, the figure will became blurry. It's really frustrating with blurry figures in my paperwork. Can anyone help me out?
1 个评论
Reed Smith
2020-4-30
I also have this issue and have not been able to fix it...
saveas(fig,'figName','epsc')
...generates great vector graphics for 2d plots, but the graphics are rasters for plot3 figures. Haven't been able to find a work around using print() or export_fig() so. Printing directly to .pdf from matlab also generates 3d raster images instead of vector graphics.
Is it possible to export 3d figures to vector graphics? Is there a work around? Thanks to anyone who can help.
回答(2 个)
Reed Smith
2020-4-30
I seem to have found the solution from the folks here: https://www.mathworks.com/matlabcentral/answers/92521-why-does-matlab-not-export-eps-files-properly#answer_101871
I don't think I was setting the renderer properly. Doing this got me 3d vector graphics:
set(fig,'renderer','Painters')
saveas(fig,'figName','epsc')
Petr Dohnalik
2022-2-14
编辑:Petr Dohnalik
2022-2-19
I ran into the same problem. As @Reed Smith pointed out, this is a matter of Matlab's renderers (most likely Painters vs OpenGL). I don't know if your plot involves also transparency. If so, Painters is not able to render the transparency. As far as I know, there are two workarounds:
1.) use finer resolution, as described here: https://www.mathworks.com/matlabcentral/answers/98094-why-does-my-printed-figure-have-poor-resolution, or
2.) print to SVG format; for example:
print('-vector','-dsvg','myVectorFile')
see also Matlab help for print (subsection "formattype"): https://www.mathworks.com/help/matlab/ref/print.html?s_tid=srchtitle_print_1.
The FEX: ExportSVG can be used as well. This tool was discussed here: https://www.mathworks.com/matlabcentral/answers/55554-getting-transparency-in-a-vector-plot.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!