Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
graph-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tiago Peixoto
graph-tool
Commits
2f7a47ca
Commit
2f7a47ca
authored
Aug 13, 2009
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix edge/vertex normalization option in graph_draw()
parent
f257d426
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/graph_tool/draw/__init__.py
src/graph_tool/draw/__init__.py
+4
-0
No files found.
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
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