Copy matlab figure in Libreoffice in Linux
조회 수: 24(최근 30일)
표시 이전 댓글
I am using Linux. I have a matlab figure that I need to copy and paste directly into Libre Office Linux. There is no "copy figure" option in the edit drop down list like there is in Windows. Any suggestion?
답변(1개)
Richard Quist
2022년 5월 4일
편집: Richard Quist
2022년 5월 4일
There are a couple options for copying the figure to the clipboard on Linux.
% This example assumes that 'fig' is the handle to your figure.
% In R2020a and later, you can use the copygraphics command and specify
% the 'ContentType' as 'vector' (to ensure tightly cropped, scalable output):
copygraphics(fig, 'ContentType', 'vector');
% This example assumes that 'fig' is the handle to your figure.
% Use the print command and specify the -clipboard option and desired
% format
% Specify -dpdf and '-painters' to ensure scalable output
print(fig, '-clipboard', '-dpdf', '-painters');
% or specify -dbitmap to copy as an image
print(fig, '-clipboard', '-dbitmap');
I hope that helps.
댓글 수: 0
참고 항목
범주
Find more on Printing and Saving in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!