Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
2f7a47ca
Commit
2f7a47ca
authored
Aug 13, 2009
by
Tiago Peixoto
Browse files
Fix edge/vertex normalization option in graph_draw()
parent
f257d426
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/draw/__init__.py
View file @
2f7a47ca
...
...
@@ -288,6 +288,8 @@ def graph_draw(g, pos=None, size=(15, 15), pin=False, layout= "neato",
minmax
[
1
]
+=
1
if
vnorm
:
vnorm
=
matplotlib
.
colors
.
normalize
(
vmin
=
minmax
[
0
],
vmax
=
minmax
[
1
])
else
:
vnorm
=
lambda
x
:
x
if
ecolor
!=
None
and
not
isinstance
(
ecolor
,
str
):
minmax
=
[
float
(
"inf"
),
-
float
(
"inf"
)]
...
...
@@ -299,6 +301,8 @@ def graph_draw(g, pos=None, size=(15, 15), pin=False, layout= "neato",
minmax
[
1
]
+=
1
if
enorm
:
enorm
=
matplotlib
.
colors
.
normalize
(
vmin
=
minmax
[
0
],
vmax
=
minmax
[
1
])
else
:
enorm
=
lambda
x
:
x
nodes
=
[]
edges
=
[]
...
...
Write
Preview
Supports
Markdown
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