igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Problem with displaying vertex's label text in Chinese characte


From: 何翔
Subject: [igraph] Problem with displaying vertex's label text in Chinese characters
Date: Sun, 3 Feb 2013 14:51:01 +0800

I use python-igraph-0.7 on Ubuntu to draw graph.  To display the vertex's text, I add its label attribute . As the text are Chinese characters of 'unicode' type (not 'str' type),  I encode them by "UTF-8". But when the graph is shown, the Chinese characters are show as the small squares, unreadable codes. The fragment of my code list as follows:
>>> g_labels = [n.encode('utf8') for n in g.vs['name']]
>>> plot(g, mark_groups=True, vertex_label=g_labels)
What's wrong with this?
thanks a lot. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]