Skip to content

Commit

Permalink
[doc] pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
sprenger committed Sep 10, 2021
1 parent 314ed2d commit a0a2d77
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doc/source/images/generate_io_overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import pygraphviz
import neo

# from datetime import datetime
#
# import numpy as np
Expand Down Expand Up @@ -45,12 +46,14 @@
styles['ext']['shape'] = 'circle'
styles['ext']['fillcolor'] = 'red'
styles['ext']['style'] = 'filled'


# styles['ext']['fixedsize'] = 'True'


def generate_diagram(filename, plot_extensions=False):
dia = pygraphviz.AGraph(strict=False, splines='true')
G=dia
G = dia
G.node_attr['fontname'] = 'Arial'
# G.node_attr['shape'] = 'circle'
# G.node_attr['fixedsize'] = 'true'
Expand All @@ -68,7 +71,6 @@ def generate_diagram(filename, plot_extensions=False):
G.graph_attr['ratio'] = '1.0'
# G.edge_attr['color'] = '#1100FF'


G.edge_attr['style'] = 'setlinewidth(4)'

dia.add_node('NEO', shape='circle', fontsize=50)
Expand Down Expand Up @@ -103,13 +105,12 @@ def generate_diagram(filename, plot_extensions=False):
dia.add_node(ext, **styles['ext'])
dia.add_edge(io_name, ext, minlen=0)

dia.layout(prog='fdp') #neato, dot, twopi, circo, fdp, nop, wc, acyclic, gvpr, gvcolor,
dia.layout(prog='fdp') # neato, dot, twopi, circo, fdp, nop, wc, acyclic, gvpr, gvcolor,
# ccomps, sccmap, tred, sfdp.
for ext in ['png', 'svg', 'eps']:
dia.draw('{}.{}'.format(filename, ext))



if __name__ == '__main__':
generate_diagram('IODiagram', plot_extensions=False)
generate_diagram('IODiagram_ext', plot_extensions=True)
Expand Down

0 comments on commit a0a2d77

Please sign in to comment.