Skip to content

Commit 692e6e1

Browse files
Merge pull request #117 from jzazo/update_readme
Fix readme minor example errors.
2 parents d734b6a + 2ed414a commit 692e6e1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ gplot(g)
3434
## Add node label
3535
```julia
3636
using LightGraphs
37-
nodelabel = [1:nv(g)]
37+
nodelabel = 1:nv(g)
3838
gplot(g, nodelabel=nodelabel)
3939

4040
```
@@ -76,13 +76,13 @@ gplot(g, nodelabelsize=nodelabelsize, nodesize=nodesize, nodelabel=nodelabel)
7676

7777
## Draw edge labels
7878
```julia
79-
edgelabel = [1:LightGraphs.ne(g)]
79+
edgelabel = 1:LightGraphs.ne(g)
8080
gplot(g, edgelabel=edgelabel, nodelabel=nodelabel)
8181
```
8282

8383
## Adjust edge labels
8484
```julia
85-
edgelabel = [1:LightGraphs.ne(g)]
85+
edgelabel = 1:LightGraphs.ne(g)
8686
gplot(g, edgelabel=edgelabel, nodelabel=nodelabel, edgelabeldistx=0.5, edgelabeldisty=0.5)
8787
```
8888

@@ -99,7 +99,7 @@ gplot(g, nodefillc=nodefillc)
9999
## Different layout
100100

101101
### spring layout (default)
102-
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+
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
103103
```julia
104104
layout=(args...)->spring_layout(args...; C=20)
105105
gplot(g, layout=layout, nodelabel=nodelabel)
@@ -152,7 +152,7 @@ gplot(h)
152152
# Arguments
153153
+ `G` graph to plot
154154
+ `layout` Optional. layout algorithm. Currently can choose from
155-
[random_layout, circular_layout, spring_layout, stressmajorize_layout,
155+
[random_layout, circular_layout, spring_layout, stressmajorize_layout,
156156
shell_layout, spectral_layout].
157157
Default: `spring_layout`
158158
+ `nodelabel` Optional. Labels for the vertices. Default: `nothing`

0 commit comments

Comments
 (0)