Skip to content
GitLab
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
69c011b8
Commit
69c011b8
authored
Jan 09, 2013
by
Tiago Peixoto
Browse files
Fix typo and inconsistency in animation_dancing.py
parent
73e23eaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/demos/animation_dancing.py
View file @
69c011b8
...
...
@@ -4,7 +4,7 @@
# This simple example on how to do animations using graph-tool, where the layout
# changes dynamically. We start with some network, and randomly rewire its
# edges, and update the layout dynamically, where edges are rewired only if
# their euclid
i
an distance is reduced. It is thus a very simplistic model for
# their euclid
e
an distance is reduced. It is thus a very simplistic model for
# spatial segregation.
from
graph_tool.all
import
*
...
...
@@ -29,7 +29,8 @@ K = 0.5 # preferred edge length
pos
=
sfdp_layout
(
g
,
K
=
K
)
# initial layout positions
offscreen
=
True
# If true, the frames will be dumped to disk as images.
# If True, the frames will be dumped to disk as images.
offscreen
=
sys
.
argv
[
1
]
==
"offscreen"
if
len
(
sys
.
argv
)
>
1
else
False
max_count
=
5000
if
offscreen
and
not
os
.
path
.
exists
(
"./frames"
):
os
.
mkdir
(
"./frames"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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