I usually work in a IPython notebook, which I open on Windows with the command
ipython qtconsole --matplotlib inline
I'm currently using IPython QtConsole 3.0.0, Python 2.7.9 and IPython 3.0.0.
I want to plot a graph, together with its labels
from igraph import *
g = Graph.Lattice([4,4],nei=1,circular=False)
g.vs["label"]=[str(i) for i in xrange(16)]
plot(g, layout="kk")
In this way, I obtain a inline plot of the graph, but there are no labels and I get the following message error for each of the missing labels
link glyph0-x hasn't been detected!
where x is some integer number.
I also tried to specify the labels directly inside the plot()
command, using vertex_label = ...
, but nothing works.
It seems to me that the labels are defined correctly and that the problem reside in the ipython notebook and/or in the modules it uses to plot the graph. Can anyone kindly help me with this issue?
I also tried all possible figure formats SVG and PNG, using the commands below, but the problem remains.
%config InlineBackend.figure_format = 'svg'
%config InlineBackend.figure_format = 'png'