Skip to content

Conversation

@sbromberger
Copy link
Contributor

Update Graphs.jl examples to LightGraphs.jl

Update `Graphs.jl` examples to `LightGraphs.jl`
@sbromberger
Copy link
Contributor Author

@simonschoelly - mind taking a look? I'm not at a system where I can test the LG changes but I think they're correct.

@codecov
Copy link

codecov bot commented Nov 11, 2019

Codecov Report

Merging #99 into master will decrease coverage by 6.24%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
- Coverage   33.54%   27.29%   -6.25%     
==========================================
  Files           9        8       -1     
  Lines         474      392      -82     
==========================================
- Hits          159      107      -52     
+ Misses        315      285      -30
Impacted Files Coverage Δ
src/layout.jl 31.14% <0%> (-15.69%) ⬇️
src/GraphPlot.jl
src/plot.jl 62.5% <0%> (+0.47%) ⬆️
src/lines.jl 53.53% <0%> (+1.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 534a9e6...4ed9adf. Read the comment docs.

@sbromberger
Copy link
Contributor Author

I didn't do anything that would've affected codecov.

using Graphs
nodelabel = [1:num_vertices(g)]
using LightGraphs
nodelabel = [vertices(g)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nodelabel = [vertices(g)]
nodelabel = collect(vertices(g))

## Draw edge labels
```julia
edgelabel = [1:Graphs.num_edges(g)]
edgelabel = [1:ne(g)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
edgelabel = [1:ne(g)]
edgelabel = collect(1:ne(g))

## Adjust edge labels
```julia
edgelabel = [1:Graphs.num_edges(g)]
edgelabel = [1:ne(g)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
edgelabel = [1:ne(g)]
edgelabel = collect(1:ne(g))

@@ -121,7 +121,7 @@ gplot(g, layout=spectral_layout)
```julia
nlist = Array(Vector{Int}, 2) # two shells
nlist[1] = [1:5] # first shell
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nlist[1] = [1:5] # first shell
nlist[1] = collect(1:5) # first shell

nlist = Array(Vector{Int}, 2) # two shells
nlist[1] = [1:5] # first shell
nlist[2] = [6:num_vertices(g)] # second shell
nlist[2] = [6:nv(g)] # second shell
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nlist[2] = [6:nv(g)] # second shell
nlist[2] = collect(6:nv(g)) # second shell

@@ -121,7 +121,7 @@ gplot(g, layout=spectral_layout)
```julia
nlist = Array(Vector{Int}, 2) # two shells
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nlist = Array(Vector{Int}, 2) # two shells
nlist = Vector{Vector{Int}}(undef, 2) # two shells

@simonschoelly
Copy link
Member

Didn't see this PR, so I made similar changes in #104 . Therefore I am closing this PR now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants