The entities are linked with named n:m relationships and I'd
> like to select one and display it in a box (with the entity
> name) and all related entities likewise in boxes linked to
> each other by lines representing the relationships tagged
> with the names of those relationships.
matplotlib may not be the best choice (someone already pointed you to
graphviz and pydot). See also pyx.
But there is a graph drawing module for matplotlib -- see