By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,621 Members | 1,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,621 IT Pros & Developers. It's quick & easy.

Dict of dicts object to a graphical tree

P: 1
I tried pygraphviz and passed dict of dicts object to it but i Only got a single level of the dict object not the entire tree . Please help me to draw a entire tree with dict object .

Object is something like :

>>> t
{'outlook': {'rainy': {'windy': {'FALSE': 'yes', 'TRUE': 'no'}}, 'overcast': 'yes', 'sunny': {'humidity': {'high': 'no', 'normal': 'yes'}}}}
>>> A=AGraph(t)
>>> A.layout(prog='dot')

i attached the final image what i got .
Attached Images
File Type: png file.png (13.8 KB, 88 views)
Dec 19 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.