matlab export plot to vector format

前端 未结 7 777
感情败类
感情败类 2021-01-04 13:21

All the time previously I was exporting Matlab figures in a raster format (JPG, PNG)

Is there a way to export a plot from Matlab in a vector format (SVG). I need it

7条回答
  •  盖世英雄少女心
    2021-01-04 13:54

    .eps files are easy enough to export and use with LaTeX. I use a function in every project that formats and saves plots to a LaTeX project. It works pretty easily. The 'eps' in the following line can be changed to any Matlab image type.

    Something like:

    figures = sort(findobj('MenuBar','figure'));
    for ii = 1:length(figures)
        saveas(gcf,['Figures/',num2str(ii)],'eps')
    end
    

提交回复
热议问题