matlab export plot to vector format

前端 未结 7 753
感情败类
感情败类 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 14:00

    I currently use the FEX package plot2svg to accomplish the task you are mentioning.

    It is quite easy to use: after you have added the folder containing the script to your matlab path you can just do

      plot2svg('myplot.svg',gcf);
    

    to save your current figure in svg. (of course you can change gcf (= GetCurrentFigure) to another handle to save other opened figures.)

    Indeed, this is the only way I found to export in vector way plots generated by the PDE toolbox.

提交回复
热议问题