Skip to content

Commit a19aa1e

Browse files
baggepinnensbromberger
authored andcommitted
Add some documentation (#72)
I had to tweak this parameter to get a nice looking graph plot, so I figured I could document it for others.
1 parent 073ed89 commit a19aa1e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ gplot(g, nodefillc=nodefillc)
9696
```
9797

9898
## Different layout
99+
100+
### spring layout (default)
101+
This is the defaut layout and will be chosen if no layout is specified. The [default parameters to the spring layout algorithm](https://github.com/JuliaGraphs/GraphPlot.jl/blob/master/src/layout.jl#L78) can be changed by supplying an anonymous function, e.g., if nodes appear clustered too tightly together, try
102+
```julia
103+
layout=(args...)->spring_layout(args...; C=20)
104+
gplot(g, layout=layout, nodelabel=nodelabel)
105+
```
106+
where `C` influences the desired distance between nodes.
107+
99108
### random layout
100109
```julia
101110
gplot(g, layout=random_layout, nodelabel=nodelabel)

0 commit comments

Comments
 (0)