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

release/4.3a0
Frank Dellaert 2012-09-15 02:53:54 +00:00
parent 60da4cb2f9
commit a9cae46b10
1 changed files with 8 additions and 0 deletions

View File

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