Statistics
| Branch: | Revision:

iof-tools / networkxMiCe / networkx-master / doc / reference / drawing.rst @ 5cef0f13

History | View | Annotate | Download (2 KB)

1
.. _drawing:
2

    
3
*******
4
Drawing
5
*******
6

    
7
NetworkX provides basic functionality for visualizing graphs, but its main goal
8
is to enable graph analysis rather than perform graph visualization. In the
9
future, graph visualization functionality may be removed from NetworkX or only
10
available as an add-on package.
11

    
12
Proper graph visualization is hard, and we highly recommend that people
13
visualize their graphs with tools dedicated to that task. Notable examples of
14
dedicated and fully-featured graph visualization tools are
15
`Cytoscape <http://www.cytoscape.org/>`_,
16
`Gephi <https://gephi.org/>`_,
17
`Graphviz <http://www.graphviz.org/>`_ and, for
18
`LaTeX <http://www.latex-project.org/>`_ typesetting,
19
`PGF/TikZ <https://sourceforge.net/projects/pgf/>`_.
20
To use these and other such tools, you should export your NetworkX graph into
21
a format that can be read by those tools. For example, Cytoscape can read the
22
GraphML format, and so, ``networkx.write_graphml(G, path)`` might be an appropriate
23
choice.
24

    
25
Matplotlib
26
==========
27
.. automodule:: networkx.drawing.nx_pylab
28
.. autosummary::
29
   :toctree: generated/
30

    
31
   draw
32
   draw_networkx
33
   draw_networkx_nodes
34
   draw_networkx_edges
35
   draw_networkx_labels
36
   draw_networkx_edge_labels
37
   draw_circular
38
   draw_kamada_kawai
39
   draw_planar
40
   draw_random
41
   draw_spectral
42
   draw_spring
43
   draw_shell
44

    
45

    
46

    
47
Graphviz AGraph (dot)
48
=====================
49
.. automodule:: networkx.drawing.nx_agraph
50
.. autosummary::
51
   :toctree: generated/
52

    
53
   from_agraph
54
   to_agraph
55
   write_dot
56
   read_dot
57
   graphviz_layout
58
   pygraphviz_layout
59

    
60

    
61
Graphviz with pydot
62
===================
63
.. automodule:: networkx.drawing.nx_pydot
64
.. autosummary::
65
   :toctree: generated/
66

    
67
   from_pydot
68
   to_pydot
69
   write_dot
70
   read_dot
71
   graphviz_layout
72
   pydot_layout
73

    
74

    
75
Graph Layout
76
============
77
.. automodule:: networkx.drawing.layout
78
.. autosummary::
79
   :toctree: generated/
80

    
81
   bipartite_layout
82
   circular_layout
83
   kamada_kawai_layout
84
   planar_layout
85
   random_layout
86
   rescale_layout
87
   shell_layout
88
   spring_layout
89
   spectral_layout
90