Skip to content

Patch 1 #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 19, 2023
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
6 changes: 3 additions & 3 deletions publication/paper.bib
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@inproceedings{Hagberg:2008,
address = {Pasadena, CA USA},
author = {Hagberg, Aric A and Schult, Daniel A and Swart, Pieter J},
booktitle = {Proceedings of the 7th Python in Science Conference},
booktitle = {Proceedings of the 7th {P}ython in Science Conference},
editor = {Varoquaux, Ga{\"{e}}l and Vaught, Travis and Millman, Jarrod},
pages = {11--15},
title = {{Exploring Network Structure, Dynamics, and Function using NetworkX}},
Expand All @@ -14,10 +14,10 @@ @article{Csardi:2006
volume = {Complex Systems},
pages = {1695},
year = {2006},
url = {http://igraph.sf.net},
url = {http://igraph.org},
}
@article{Peixoto:2014,
title = {The graph-tool python library},
title = {The graph-tool {P}ython library},
url = {http://figshare.com/articles/graph_tool/1164194},
doi = {10.6084/m9.figshare.1164194},
journal = {figshare},
Expand Down
8 changes: 4 additions & 4 deletions publication/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ bibliography: paper.bib

# Statement of need

The empirical study and scholarly analysis of networks have increased manifold in recent decades, fuelled by the new prominence of network structures in our lives (the web, social networks, artificial neural networks, ecological networks, etc.) and the data available on them. While there are several comprehensive Python libraries for network analysis such as NetworkX [@Hagberg:2008], igraph [@Csardi:2006], and graph-tool [@Peixoto:2014], their inbuilt visualisation capabilities lag behind specialised software solutions such as Graphviz [@Ellson:2002], Cytoscape [@Shannon:2003], or Gephi [@Bastian:2009]. However, although Python bindings for these applications exist in the form of PyGraphviz, py4cytoscape, and GephiStreamer, respectively, their outputs are not manipulable Python objects, which restricts customisation, limits their extensibility, and prevents a seamless integration within a wider Python application.
The empirical study and scholarly analysis of networks have increased manifold in recent decades, fuelled by the new prominence of network structures in our lives (the web, social networks, artificial neural networks, ecological networks, etc.) and the data available on them. While there are several comprehensive Python libraries for network analysis such as NetworkX [@Hagberg:2008], igraph [@Csardi:2006], and graph-tool [@Peixoto:2014], their inbuilt visualisation capabilities lag behind specialised software solutions such as Graphviz [@Ellson:2002], Cytoscape [@Shannon:2003], and Gephi [@Bastian:2009]. However, although Python bindings for these applications exist in the form of PyGraphviz, py4cytoscape, and GephiStreamer, respectively, their outputs are not manipulable Python objects, which restricts customisation, limits their extensibility, and prevents a seamless integration within a wider Python application.

# Summary

Netgraph is a Python library that aims to complement the existing network analysis libraries with publication-quality visualisations within the Python ecosystem. To facilitate a seamless integration, Netgraph supports a variety of input formats, including NetworkX, igraph, and graph-tool Graph objects. At the time of writing, Netgraph provides the following node layout algorithms:

- the Fruchterman-Reingold algorithm a.k.a. the "spring" layout,
- the Sugiyama algorithm a.k.a. the "dot" layout for directed, acyclic graphs,
- the Fruchterman-Reingold algorithm, a.k.a. the "spring" layout,
- the Sugiyama algorithm, a.k.a. the "dot" layout for directed, acyclic graphs,
- a radial tree layout for directed, acyclic graphs,
- a circular node layout (with optional edge crossing reduction),
- a bipartite node layout for bipartite graphs (with optional edge crossing reduction),
Expand Down Expand Up @@ -135,7 +135,7 @@ fig.canvas.draw()

# Key Design Decisions

The creation of Netgraph was motivated by the desire to make high-quality, easily customisable, and reproducible network visualisations, whilst maintaining an extensible code base. To that end, a key design decision was to have a single reference frame for all node artist and edge artist attributes that determine their extent (e.g. in the case of a circular node artist, its position and its radius).
The creation of Netgraph was motivated by the desire to make high-quality, easily customisable, and reproducible network visualisations, whilst maintaining an extensible code base. To that end, a key design decision was to have a single reference frame for all node artist and edge artist attributes that determine their extent (e.g., in the case of a circular node artist, its position and its radius).

Good data visualisations are both accurate and legible. The legibility of a visualisation is influenced predominantly by the size of the plot elements, and occlusions between them. However, there is often tension between these two requirements, as larger plot elements are more visible but also more likely to cause overlaps with other plot elements. Most data visualisation tools focus on accuracy and visibility. To that end, they operate in two reference frames: a data-derived reference frame and a display-derived reference frame. For example, in a standard line-plot, the data-derived reference frame determines the x and y values of the line. The thickness of the line, however, scales with the size of the display, and its width (measured in pixels) remains constant across different figure sizes and aspect ratios. Having two reference frames ensures that the line (1) is an accurate representation of the data, and (2) is visible and discernible independent of figure dimensions. The trade-off of this setup is that (1) the precise extents of plot elements can only be computed after the figure is initialised, and (2) occlusions are not managed and hence common, for example, if multiple lines are plotted in the same figure. Nevertheless, most network visualisation tools follow this standard. For example, NetworkX specifies node positions and edge paths in data coordinates, but uses display units for node sizes and edge widths.

Expand Down