copy part of figure to clipboard
1 回表示 (過去 30 日間)
古いコメントを表示
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:
- I get the needed part and save the cdata.
- Then make a figure
- Then plot the image
- then set the size and make some adjustments
- then "print" the figure to the clipboard
- 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.
2017 年 5 月 31 日
Hey masiat,
did you find a solution in the meantime? I came here with the exact same question.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Printing and Saving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!