Saving a figure without menu?

There is a figure('Menu','none') and a plot inside that figure. nothing else. is it possible to save it in .fig or .jpg? or extract data?

 採用された回答

Jan
Jan 2013 年 8 月 30 日

0 投票

You can export the figure's contents by commands written to the command window or from inside a script or function. See help print and help saveas. It would be easy to active the menubar also, as Azzi has shown already.

3 件のコメント

thomas mann
thomas mann 2013 年 8 月 30 日
is it possible to protect figure's contents from exporting?
Jan
Jan 2013 年 8 月 30 日
編集済み: Jan 2013 年 8 月 30 日
No, figures can be accessed freely from Matlab. If you explain the intention of this question, a more detailed answer would be possible.
thomas mann
thomas mann 2013 年 8 月 31 日
i create a gui, which can plot some curve in a different figure, which is set Menu to none. i dont want others to save the results.

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

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 30 日
編集済み: Azzi Abdelmalek 2013 年 8 月 30 日

0 投票

x=0:0.1:10;
y=sin(x)
h=plot(x,y)
saveas(h,'filename.jpg')

2 件のコメント

thomas mann
thomas mann 2013 年 8 月 30 日
sorry, you didnt get it. i already have a figure with no menu with a plot. i dont know the handle of the plot, it wasnt created by me but a gui.
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 30 日
Try this
set(gcf,'menubar','figure')

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

カテゴリ

ヘルプ センター および File ExchangeGraphics Performance についてさらに検索

製品

質問済み:

2013 年 8 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by