Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tiago Peixoto
graph-tool
Commits
2881e360
Commit
2881e360
authored
Feb 05, 2016
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix drawing of graphs with no edges
This fixes issue
#269
parent
441463ed
Pipeline
#107
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/graph_tool/draw/cairo_draw.py
src/graph_tool/draw/cairo_draw.py
+1
-1
No files found.
src/graph_tool/draw/cairo_draw.py
View file @
2881e360
...
@@ -1278,7 +1278,7 @@ def get_bb(g, pos, size, pen_width, size_scale=1, text=None, font_family=None,
...
@@ -1278,7 +1278,7 @@ def get_bb(g, pos, size, pen_width, size_scale=1, text=None, font_family=None,
size
[:]
=
size
[
i
]
size
[:]
=
size
[
i
]
break
break
sl
=
label_self_loops
(
g
)
sl
=
label_self_loops
(
g
)
slm
=
sl
.
fa
.
max
()
*
0.75
slm
=
sl
.
fa
.
max
()
*
0.75
if
g
.
num_edges
()
>
0
else
0
delta
=
(
size
*
size_scale
*
(
slm
+
1
))
/
2
+
pen_width
*
2
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
()]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment