parrt / lolviz

A simple Python data-structure visualization tool for lists of lists, lists, dictionaries; primarily for use in Jupyter notebooks / presentations
BSD 3-Clause "New" or "Revised" License
829 stars 47 forks source link

allowing other formats other than 'pdf' which is graphviz's default #1

Closed DeepSpace2 closed 7 years ago

DeepSpace2 commented 7 years ago

Also some PEP-8ing.

parrt commented 7 years ago

Hi. thanks for the PR. i'll take a look when I get a chance. as the formatting has changed, it's harder to tell what's new.

DeepSpace2 commented 7 years ago

Hi. thanks for the PR. i'll take a look when I get a chance. as the formatting has changed, it's harder to tell what's new.

The new functionality is achieved by simply adding a format kwarg (with default argument None so backward compatibility is maintained) to the 4 "viz" functions, which get passed to graphviz.Source.

parrt commented 7 years ago

Actually it looks like you can just do g.format = 'png' on the object it comes back before you render it so I don't think we need this PR.