copy uipanel content to clipboard

2 Ansichten (letzte 30 Tage)
michael
michael am 2 Dez. 2012
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

Antworten (2)

Richard Quist
Richard Quist am 3 Dez. 2012
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 Kommentare
michael
michael am 8 Dez. 2012
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 am 9 Dez. 2012
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.

Melden Sie sich an, um zu kommentieren.


Walter Roberson
Walter Roberson am 3 Dez. 2012
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.

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by