Plot Bayes tree within matlab ! (dot -> png -> imread -> imshow).

release/4.3a0
Frank Dellaert 2012-09-15 03:05:22 +00:00
parent 107d293ed7
commit b95210a5f0
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
function plotBayesTree(bayesTree)
% plotBayesTree saves as dot file, renders, and shows as image
% Needs dot installed
bayesTree.saveGraph('/tmp/bayesTree.dot')
!dot -Tpng -o /tmp/dotImage.png /tmp/bayesTree.dot
dotImage=imread('/tmp/dotImage.png');
imshow(dotImage)