How to export the result as a picture

1 次查看(过去 30 天)
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')

更多回答(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