Commit 6c624cac authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Improve bounding box calculation in graph_draw()

parent c423f60f
...@@ -926,7 +926,7 @@ def get_bb(g, pos, size, pen_width, size_scale=1, text=None, font_family=None, ...@@ -926,7 +926,7 @@ def get_bb(g, pos, size, pen_width, size_scale=1, text=None, font_family=None,
break break
sl = label_self_loops(g) sl = label_self_loops(g)
slm = sl.a.max() * 0.75 slm = sl.a.max() * 0.75
delta = (size * size_scale * (slm + 1)) / 2 + pen_width delta = (size * size_scale * (slm + 1)) / 2 + pen_width * 2
x_range = [pos_x.fa.min(), pos_x.fa.max()] x_range = [pos_x.fa.min(), pos_x.fa.max()]
y_range = [pos_y.fa.min(), pos_y.fa.max()] y_range = [pos_y.fa.min(), pos_y.fa.max()]
x_delta = [x_range[0] - (pos_x.fa - delta).min(), x_delta = [x_range[0] - (pos_x.fa - delta).min(),
......
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