Commit c7d0248a authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files limit maximum figure size

parent ddccc3bf
......@@ -88,7 +88,7 @@ def draw_entry(entry, alt, svg=False, size=None, bg_color="#cdcdcd",
g = gt.GraphView(g, vfilt=c)
if size is None:
size = max(2000, int(20 * numpy.sqrt(g.num_vertices())))
size = min(max(2000, int(20 * numpy.sqrt(g.num_vertices()))), 20000)
gt.graph_draw(g, pos=g.vp["_pos"], fmt=fmt, edge_color=edge_color,
bg_color=bg_color, output_size=(size, size),
adjust_aspect=False, output=buf)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment