フィルターのクリア

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 Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

製品


リリース

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by