Skip to content

Commit d6e3766

Browse files
committed
update examples
1 parent c62ada1 commit d6e3766

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/src/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ SFDP
4545
### Example
4646
```@example layouts
4747
g = wheel_graph(10)
48-
layout = SFDP(tol=0.01, C=0.2, K=1)
48+
layout = SFDP(Ptype=Float32, tol=0.01, C=0.2, K=1)
4949
f, ax, p = graphplot(g, layout=layout)
5050
hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect(); f
5151
```
@@ -54,7 +54,7 @@ hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect(); f
5454
```@example layouts
5555
iterator = LayoutIterator(layout, g)
5656
record(f, "sfdp_animation.mp4", iterator; framerate = 10) do pos
57-
p[:node_positions][] = pos
57+
p[:node_pos][] = pos
5858
autolimits!(ax)
5959
end
6060
nothing #hide
@@ -90,15 +90,15 @@ Spring
9090
### Example
9191
```@example layouts
9292
g = smallgraph(:cubical)
93-
layout = Spring()
93+
layout = Spring(Ptype=Float32)
9494
f, ax, p = graphplot(g, layout=layout)
9595
hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect(); f #hide
9696
```
9797
### Iterator Example
9898
```@example layouts
9999
iterator = LayoutIterator(layout, g)
100100
record(f, "spring_animation.mp4", iterator; framerate = 10) do pos
101-
p[:node_positions][] = pos
101+
p[:node_pos][] = pos
102102
autolimits!(ax)
103103
end
104104
nothing #hide
@@ -112,7 +112,7 @@ Stress
112112
### Example
113113
```@example layouts
114114
g = complete_graph(10)
115-
layout = Stress()
115+
layout = Stress(Ptype=Float32)
116116
f, ax, p = graphplot(g, layout=layout)
117117
hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect(); f #hide
118118
```
@@ -121,7 +121,7 @@ hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect(); f #hide
121121
```@example layouts
122122
iterator = LayoutIterator(layout, g)
123123
record(f, "stress_animation.mp4", iterator; framerate = 10) do pos
124-
p[:node_positions][] = pos
124+
p[:node_pos][] = pos
125125
autolimits!(ax)
126126
end
127127
nothing #hide

0 commit comments

Comments
 (0)