필터 지우기
필터 지우기

How to export the result as a picture

조회 수: 2 (최근 30일)
dcydhb dcydhb
dcydhb dcydhb 2019년 4월 3일
댓글: dcydhb dcydhb 2019년 4월 5일
How to export the result as a picture.
I use the
biograph
function that comes with matlab to get the roadmap, but I can't copy it. I can't export it to a picture. how do I copy it to the clipboard or export it to a picture file?
codes are as this
clc;
clear all;
close all;
close all hidden
W = [.41 .99 .51 .32 .15 .45 .38 .32 .36 .29 .21];
DG = sparse([6 1 2 2 3 4 4 5 5 6 1],[2 6 3 5 4 1 6 3 4 3 5],W)
h = view(biograph(DG,[],'ShowWeights','on'))
export(h,'h.png')

채택된 답변

KSSV
KSSV 2019년 4월 3일
편집: KSSV 2019년 4월 3일
close all;
close all hidden
W = [.41 .99 .51 .32 .15 .45 .38 .32 .36 .29 .21];
DG = sparse([6 1 2 2 3 4 4 5 5 6 1],[2 6 3 5 4 1 6 3 4 3 5],W)
h = biograph(DG,[],'ShowWeights','on')
% export(h,'h.png')
g = biograph.bggui(h);
f = figure;
copyobj(g.biograph.hgAxes,f);
f = get(g.biograph.hgAxes, 'Parent');
print(f, '-djpeg', 'test.jpg')
  댓글 수: 1
dcydhb dcydhb
dcydhb dcydhb 2019년 4월 5일
great answer and thanks a lot!!!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

제품


릴리스

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by