copy uipanel content to clipboard

Hi,
l have a uipanel containing multiples Axes ...how to copy the content of the uipanel to clipboard ? for now l'm using a snipping tool, not convenient.
tried and searched for Print option, couldn't find anything.
rgds,
Michael

回答 (2 件)

Richard Quist
Richard Quist 2012 年 12 月 3 日

0 投票

Have you tried, from the MATLAB command line or within a function or script:
print(fig, '-dmeta')
where fig is the figure that contains your content?

5 件のコメント

Walter Roberson
Walter Roberson 2012 年 12 月 3 日
The poster wants only the uipanel not the entire figure.
I would say it is worth trying to pass in the uipanel handle instead of a figure handle.
Richard Quist
Richard Quist 2012 年 12 月 3 日
Passing in the uipanel handle directly won't work. The command expects a figure. Your copyobj suggestion below is probably the way to go if only the uipanel is wanted
Walter Roberson
Walter Roberson 2012 年 12 月 3 日
I seem to remember from the source that the FEX contribution export_fig can do this kind of copying automatically.
michael
michael 2012 年 12 月 8 日
thanks for your inputs, l tried the Copyobj, and copy the whole uipanel to a new figure but then the figure is not autofitting to the uipanel, could do it manually but takes away the benefit of the automation. Tried export_fig(), really nice finction but can not pass the uipanel, send a message to the author.
thanks again,
Michael
Walter Roberson
Walter Roberson 2012 年 12 月 9 日
get() the Position of the uipanel and set() it as the Position of the new figure before doing the copyobj(). You might have to temporarily set() the Units of the uipanel to pixels before get()'ing the Position.

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

Walter Roberson
Walter Roberson 2012 年 12 月 3 日

0 投票

Sometimes what has to be done is to create a second figure, copyobj() the graphics into the new figure, and print() or saveas() or export_fig the new figure.

カテゴリ

ヘルプ センター および File ExchangePrinting and Saving についてさらに検索

タグ

質問済み:

2012 年 12 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by