How can I export a figure to *.svg?

204 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
コメント済み: Eric Sargent 2023 年 12 月 20 日
I'd like to export a figure as *.svg. Thus I'm trying:
File -> Export Setup -> Export
and chooses type *.svg. But this does not work. I obtain the following error message:
ERROR: Error using ==> hgexport at 858
Error using ==> graphics\private\prepare at 307
Error using ==> <a href="error:D:\MATLAB\R2007a\toolbox\matlab\graphics\private\prepare.m,100,1">graphics\private\prepare at 100</a>
Error using ==> graphics\private\prepare at 41
The SVG device option is only supported for Simulink systems.

採用された回答

MathWorks Support Team
MathWorks Support Team 2023 年 4 月 10 日
編集済み: MathWorks Support Team 2023 年 4 月 13 日
The ability to export a figure to SVG file is not supported in MATLAB 7.4 (R2007a). A possible workaround could be found on the File Exchange:
Note that MathWorks does not guarantee or warrant the use or content of submissions to the MATLAB Central File Exchange. Any questions, issues, or complaints should be directed to the contributing author.
  1 件のコメント
Eric Sargent
Eric Sargent 2023 年 12 月 20 日
You can use the print function to export to svg.
fig = gcf;
print(fig,'MyPlot.svg','-dsvg');

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePrinting and Saving についてさらに検索

製品


リリース

R2007a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by