Drawing and plotting routines for igraph.
IGraph has two stable plotting backends at the moment: Cairo and Matplotlib. It also has experimental support for plotly.
The Cairo backend is dependent on the pycairo or cairocffi libraries that provide Python bindings to the popular Cairo library. This means that if you don't have pycairo or cairocffi installed, you won't be able to use the Cairo plotting backend. Whenever the documentation refers to the pycairo library, you can safely replace it with cairocffi as the two are API-compatible.
The Matplotlib backend uses the Matplotlib library. You will need to install it from PyPI if you want to use the Matplotlib plotting backend. Many of our gallery examples use the matplotlib backend.
The plotly backend uses the plotly library and, like matplotlib, requires installation from PyPI.
If you do not want to (or cannot) install any of the dependencies outlined above, you can still save the graph to an SVG file and view it from Mozilla Firefox (free) or edit it in Inkscape (free), Skencil (formerly known as Sketch, also free) or Adobe Illustrator.
||Abstract base classes for the drawing routines.|
||No package docstring; 10/13 modules documented|
||Color handling functions.|
||Drawing routines to draw graphs.|
||No package docstring; 7/9 modules documented|
||Auxiliary classes for the default graph drawer in igraph.|
||No package docstring; 3/5 modules documented|
||Shape drawing classes for igraph|
||Drawers for labels on plots.|
||Utility classes for drawing routines.|
||Static class that finds the object/backend drawer|
||Plots the given object to the given target.|
Plots the given object to the given target.
Positional and keyword arguments not explicitly mentioned here will be passed down to the __plot__ method of the object being plotted. Since you are most likely interested in the keyword arguments available for graph plots, see
Graph.__plot__ as well.
|obj||the object to be plotted|
the target where the object should be plotted. It can be one of the following types:
|bbox||the bounding box of the plot. It must be a tuple with either two or four integers, or a |
|opacity||the opacity of the object being plotted. It can be used to overlap several plots of the same graph if you use the same layout for them -- for instance, you might plot a graph with opacity 0.5 and then plot its spanning tree over it with opacity 0.1. To achieve this, you'll need to modify the |
|palette||the palette primarily used on the plot if the added objects do not specify a private palette. Must be either an |
|margin||the top, right, bottom, left margins as a 4-tuple. If it has less than 4 elements or is a single float, the elements will be re-used until the length is at least 4. The default margin is 20 units on each side. Ignored for Matplotlib plots.|
|inline||whether to try and show the plot object inline in the current IPython notebook. Passing None here or omitting this keyword argument will look up the preferred behaviour from the shell.ipython.inlining.Plot configuration key. Note that this keyword argument has an effect only if igraph is run inside IPython and target is None.|
|an appropriate |