lldp_neighbours_graph = AGraph(strict = False, directed = True, overlap = "scale", splines="ortho", nodesep="0.5", rankdir = "LR") # Set the style attributes of the graph lldp_neighbours_graph.node_attr['style']='rounded' lldp_neighbours_graph.node_attr['shape']='box' lldp_neighbours_graph.node_attr['fixedsize']='false' lldp_neighbours_graph.node_attr['labelloc']='c' lldp_neighbours_graph.node_attr['fontname']='times' lldp_neighbours_graph.node_attr['fontcolor']='purple' lldp_neighbours_graph.node_attr['sep']='5'
lldp_neighbours_graph.add_edge(source,destination,key=key_str,dir='both', headlabel=remote_port, taillabel=local_port, style='bold',color='blue', minlen=5)
# Resize all the nodes based on the number of incoming and outgoing nodes edges for node in lldp_neighbours_graph.nodes(): if edge_count[node] > 0: node.attr['height'] = 0.6 * edge_count[node] #I maintain a count of edges and this logic works fine node.attr['width'] = 0.6 * edge_count[node] else: node.attr['height'] = 2 node.attr['fontcolor'] = 'orange'
# Write the graph to a dot filegraph.write('graph.dot') # write to simple.dot
#neato, dot, twopi, circo, fdp, nop, wc, acyclic, gvpr, gvcolor, ccomps, sccmap, tred, sfdp.# Write the graph to a SVG filegraph.draw('graph.svg',prog='dot',args='-Gsplines=ortho')
> email to pygraphviz-discuss+unsub...@googlegroups.com.
>> > email to pygraphviz-discuss+unsub...@googlegroups.com.
>> > To post to this group, send email to pygraphvi...@googlegroups.com.
>> > Visit this group at http://groups.google.com/group/pygraphviz-discuss.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "pygraphviz-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pygraphviz-discuss+unsub...@googlegroups.com.
/Library/Python/2.7/site-packages/pygraphviz/agraph.py:1332: RuntimeWarning: Aug 12 13:58:21 animeshk-mbp dot[51364] <Error>: The function ‘CGFontGetGlyphPath’ is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance.
Aug 12 13:58:21 animeshk-mbp dot[51364] <Error>: The function ‘CGFontGetGlyphPaths’ is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance.
warnings.warn(b"".join(errors), RuntimeWarning)
graph.draw("graph",prog='dot')
File "../script/lldp_network.py", line 300, in write_graph
graph.draw("graph",prog='dot')
File "/Library/Python/2.7/site-packages/pygraphviz/agraph.py", line 1468, in draw
data = self._run_prog(prog, args)
File "/Library/Python/2.7/site-packages/pygraphviz/agraph.py", line 1329, in _run_prog
raise IOError(b"".join(errors))
IOError: dyld: lazy symbol binding failed: Symbol not found: _pixman_region32_init
Referenced from: /usr/local/lib/graphviz/libgvplugin_pango.6.dylib
Expected in: flat namespace
dyld: Symbol not found: _pixman_region32_init
Referenced from: /usr/local/lib/graphviz/libgvplugin_pango.6.dylib
Expected in: flat namespace
dot - graphviz version 2.38.0 (20140413.2041)
libdir = "/usr/local/lib/graphviz"
Activated plugin library: libgvplugin_dot_layout.6.dylib
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.6.dylib
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
/usr/local/lib/graphviz/config6
was successfully loaded.
render : cairo dot fig map pic pov ps quartz svg tk vml xdot
layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
textlayout : textlayout
device : bmp canon cgimage cmap cmapx cmapx_np dot eps exr fig gif gv icns ico imap imap_np ismap jp2 jpe jpeg jpg pct pdf pic pict plain plain-ext png pov ps ps2 psd sgi svg svgz tga tif tiff tk vml vmlz x11 xdot xdot1.2 xdot1.4 xlib
loadimage : (lib) bmp eps gif jpe jpeg jpg pdf png ps svg
>> >> > email to pygraphviz-discuss+unsub...@googlegroups.com.
>> >> > To post to this group, send email to pygraphvi...@googlegroups.com.
>> >> > Visit this group at
>> >> > http://groups.google.com/group/pygraphviz-discuss.
>> >> > For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "pygraphviz-discuss" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to pygraphviz-discuss+unsub...@googlegroups.com.
>> > To post to this group, send email to pygraphvi...@googlegroups.com.
>> > Visit this group at http://groups.google.com/group/pygraphviz-discuss.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "pygraphviz-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pygraphviz-discuss+unsub...@googlegroups.com.