copy part of figure to clipboard

조회 수: 1 (최근 30일)
masiat
masiat 2016년 8월 4일
댓글: M. A. 2017년 5월 31일
Hi! I am trying to capture a specific part of a bigger figure (GUI) and copy it to the windows clipboard. Up to now I am doing the following:
  1. I get the needed part and save the cdata.
  2. Then make a figure
  3. Then plot the image
  4. then set the size and make some adjustments
  5. then "print" the figure to the clipboard
  6. then close the figure
if true
sz = getpixelposition(handles.GUI.findobj('tag','uipanel2'));
f = getframe(handles.GUI,sz);
hf = figure(765);
imshow(f.cdata);
axis off;
set(gca,'position',[0 0 1 1],'units','normalized')
set(hf,'PaperPosition',[0 0 sz(4) sz(3)])
print(hf,'-dmeta','-r200')
close(hf)
end
Ist there a posibility to do the same without opening a new figure? probably something like
if true
sz = getpixelposition(handles.GUI.findobj('tag','uipanel2'));
print(hf, ***sz***,'-dmeta','-r200')
end
  댓글 수: 1
M. A.
M. A. 2017년 5월 31일
Hey masiat,
did you find a solution in the meantime? I came here with the exact same question.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by