Daft is a Python package that uses matplotlib to render pixel-perfect probabilistic graphical models for publication in a journal or on the internet. With a short Python script and an intuitive model-building syntax you can design directed and undirected graphs and save them in any formats that matplotlib supports.
Get more information at daft-pgm.org
Try making some PGMs with the example notebooks
(You may need to rebuild the binder.)