habib-university / Class-Teams

2 stars 5 forks source link

Visualization name and format #8

Open waqarsaleem opened 5 years ago

waqarsaleem commented 5 years ago

Add command line flags to specify the name and format of the output visualization file.

EmadBinAbid commented 5 years ago

@waqarsaleem what formats are currently available for the output visualisation file? This information is inevitable to address this issue.

waqarsaleem commented 5 years ago

The visualization uses the graphviz module. The documentation list a large number of options.

bmp, canon , dot , gv , xdot , xdot1.2 , xdot1.4, cgimage, cmap, eps, exr, fig, gd , gd2, gif, gtk, ico, imap , cmapx, imap_np , cmapx, ismap, jp2, jpg , jpeg , jpe, json , json0 , dot_json , xdot_json, pct , pict, pdf, pic, plain , plain-ext, png, pov, ps, ps2, psd, sgi, svg , svgz, tga, tif , tiff, tk, vml , vmlz, vrml, wbmp, webp, xlib , x11

Here is example usage.

>>> from graphviz import Graph
>>> g = Graph(format='png') # example of specifying the format on creation (optional)
>>> g.format = 'svg'  # example of specifying the format for a created graph object
>>> g.render()  
'test-output/round-table.gv.svg'