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
76dbca5b
Commit
76dbca5b
authored
Apr 12, 2015
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix drawing of empty graphs
This fixes
#209
parent
7d1b0536
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/graph_tool/draw/cairo_draw.py
src/graph_tool/draw/cairo_draw.py
+2
-2
No files found.
src/graph_tool/draw/cairo_draw.py
View file @
76dbca5b
...
...
@@ -1057,8 +1057,8 @@ def graph_draw(g, pos=None, vprops=None, eprops=None, vorder=None, eorder=None,
def
adjust_default_sizes
(
g
,
geometry
,
vprops
,
eprops
,
force
=
False
):
if
"size"
not
in
vprops
or
force
:
A
=
geometry
[
0
]
*
geometry
[
1
]
if
g
.
num_vertices
()
>
0
:
vprops
[
"size"
]
=
np
.
sqrt
(
A
/
g
.
num_vertices
()
)
/
3.5
N
=
max
(
g
.
num_vertices
()
,
1
)
vprops
[
"size"
]
=
np
.
sqrt
(
A
/
N
)
/
3.5
if
"pen_width"
not
in
vprops
or
force
:
size
=
vprops
[
"size"
]
...
...
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