Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,212 changes: 1,212 additions & 0 deletions doc/source/images/IODiagram.eps

Large diffs are not rendered by default.

Binary file added doc/source/images/IODiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
525 changes: 525 additions & 0 deletions doc/source/images/IODiagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/source/images/base_schematic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,547 changes: 1,697 additions & 1,850 deletions doc/source/images/base_schematic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 114 additions & 0 deletions doc/source/images/generate_io_overview.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# -*- coding: utf-8 -*-

"""
This generate diagram of the (raw)ios and formats


Author: Julia Sprenger
"""

import pygraphviz
import neo

# from datetime import datetime
#
# import numpy as np
# import quantities as pq
# from matplotlib import pyplot
# from matplotlib.patches import Rectangle, ArrowStyle, FancyArrowPatch
# from matplotlib.font_manager import FontProperties
#
# from neo.test.generate_datasets import fake_neo
#
# line_heigth = .22
# fontsize = 10.5
# left_text_shift = .1
# dpi = 100


default_style = {'shape': 'rectangle',
'color': 'black',
'fontcolor': 'black'}
IO_style = default_style.copy()
IO_style['fontsize'] = '30'
IO_style['penwidth'] = 6

styles = {'IO': {'ro': IO_style.copy(),
'rw': IO_style.copy(),
'raw': IO_style.copy()
},
'main': default_style.copy(),
'ext': default_style.copy()}

styles['IO']['ro']['color'] = '#20B2AA '
styles['IO']['rw']['color'] = '#4169E1 '
styles['IO']['raw']['color'] = '#008080 '
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.node_attr['fontname'] = 'Arial'
# G.node_attr['shape'] = 'circle'
# G.node_attr['fixedsize'] = 'true'
# G.node_attr['sep'] = '-100'
G.node_attr['fixedsize'] = 'False'
# G.graph_attr['overlap'] = 'False'
G.graph_attr['packMode'] = 'clust'
# G.graph_attr['levelsgap'] = -500
G.node_attr['fontsize'] = '20'
G.edge_attr['minlen'] = '0'
# G.node_attr['style'] = 'filled'
# G.graph_attr['outputorder'] = 'edgesfirst'
# G.graph_attr['splines'] = "compound"
G.graph_attr['label'] = "NEO {}".format(neo.__version__)
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)

for io in neo.io.iolist:
io_name = io.name
rawio = False
if issubclass(io, neo.io.basefromrawio.BaseFromRaw):
rawio = True
if io_name == 'BaseIO':
io_name = io.__name__.rstrip('RawIO')
if io_name is None:
io_name = io.__name__.rstrip('IO')
if 'example' in io_name:
continue

if io.is_writable and io.is_readable:
mode = 'rw'
elif io.is_readable:
mode = 'ro'
if rawio:
mode = 'raw'

dia.add_node(io_name, **styles['IO'][mode])
dia.add_edge('NEO', io_name)

if plot_extensions:
for ext in io.extensions:
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,
# 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)
# pyplot.show()
Binary file removed doc/source/images/neo_UML_French_workshop.dia
Binary file not shown.
Binary file removed doc/source/images/neo_UML_French_workshop.png
Binary file not shown.
193 changes: 193 additions & 0 deletions doc/source/images/neo_ecosystem.drawio

Large diffs are not rendered by default.

Loading