|
From: | Andrei Sokolov |
Subject: | [igraph] vertex label position depends on the font size |
Date: | Sun, 29 Aug 2010 07:23:33 +0000 |
Hi, I have a problem with the vertex labels. It appears that the label position for vertex 0 depends on the font size. It shifts from bottom left to top right as I increase the font size. You can see it for yourself if you run the code below. It makes a movie of a simple network with labels of gradually increasing size. I attached the movie for your convenience. Does anyone know what may be causing this and how to fix the position of vertex 0 so that it stays fixed? from igraph import * graph = Graph(5) visual_style = {} visual_style["vertex_label_color"] = ['yellow','yellow','yellow','yellow','yellow'] visual_style["layout"] = graph.layout('circle') visual_style["vertex_size"] = [15,15,15,15,15] visual_style["vertex_color"] = ['black','black','black','black','black'] visual_style["vertex_label_dist"] = [0,0,0,0,0] visual_style["margin"] = 100 for i in range(1,21): visual_style["vertex_label_size"] = [i,i,i,i,i] plot(graph, "test_labels" + "%02d"%i + ".png", **visual_style) import os os.system('mencoder "mf://test_labels*.png" -mf type=png:fps=2 -ovc lavc -o test_labels.avi') |
test_labels.avi
Description: MS Video
[Prev in Thread] | Current Thread | [Next in Thread] |