0

I'm following the tutorial at http://pyeda.readthedocs.org/en/latest/bdd.html to visualize a majority function BDD. I've done the following :

In [1]: %install_ext https://raw.github.com/cjdrake/ipython-magic/master/gvmagic.py

In [2]: %load_ext gvmagic

For example, here is the majority function in three variables as a BDD:

In [3]: a, b, c = map(bddvar, 'abc')

In [4]: f = a & b | a & c | b & c

In [5]: %dotobj

Apparently my graph is now made, but how do I see it? There are no instructions for that on the website

S2C
  • 53
  • 1
  • 12

2 Answers2

3

I've only been using PythonEDA for a few hours, so my experience is very limited, but I was having this problem as well. I found a workaround to visualize using the Source module in graphviz. Using the example:

>>> from pyeda.inter import *

>>> from graphviz import Source

>>> a, b, c = map(bddvar, 'abc')

>>> f = a & b | a & c | b & c

>>> gv = Source(f.to_dot())

>>> gv.render('render_pdf_name',view=True)

will create a pdf in the current working directory, with the name render_pdf_name.

Cheers!

matmerr
  • 31
  • 4
1

PyEDA author here.

There's an example IPython notebook here. It has some examples that might help.

Chris Drake
  • 353
  • 1
  • 7