Skip to content

Commit 0c5ba55

Browse files
committed
nicer example for stress
1 parent b42057a commit 0c5ba55

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/src/index.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,22 @@ Stress
111111
```
112112
### Example
113113
```@example layouts
114-
g = complete_graph(10)
114+
g = SimpleGraph(936)
115+
for l in eachline(joinpath(@__DIR__,"..","..","test","jagmesh1.mtx"))
116+
s = split(l, " ")
117+
src, dst = parse(Int, s[1]), parse(Int, s[2])
118+
src != dst && add_edge!(g, src, dst)
119+
end
120+
115121
layout = Stress(Ptype=Float32)
116-
f, ax, p = graphplot(g, layout=layout)
122+
f, ax, p = graphplot(g; layout=layout, node_size=3, edge_width=1)
117123
hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect(); f #hide
118124
```
119125

120126
### Iterator Example
121127
```@example layouts
122128
iterator = LayoutIterator(layout, g)
123-
record(f, "stress_animation.mp4", iterator; framerate = 10) do pos
129+
record(f, "stress_animation.mp4", iterator; framerate = 7) do pos
124130
p[:node_pos][] = pos
125131
autolimits!(ax)
126132
end

0 commit comments

Comments
 (0)