Skip to content

Commit a6ddbe6

Browse files
authored
Merge pull request #248 from MakieOrg/hw/fixdocs
bump MLJ and adjust for new Revise dep graph
2 parents 9319d16 + 6344454 commit a6ddbe6

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ GraphMakie = ">= 0.1"
2929
Graphs = "1"
3030
LayeredLayouts = "0.2"
3131
Literate = "2"
32-
MLJ = "0.20, 0.21, 0.22"
32+
MLJ = "0.20, 0.21, 0.22, 0.23"
3333
Makie = "0.24"
3434
NetworkDynamics = "0.9, 0.10"
3535
NetworkLayout = "0.4.7"

docs/examples/depgraph.jl

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,14 @@ lay = Point.(zip(xs,ys))
7979
## create a vector of Point2f per edge
8080
wp = [Point2f.(zip(paths[e]...)) for e in edges(g)]
8181

82-
## manually tweak some of the label aligns
82+
## manually tweak some of the label aligns and plot the graph
8383
align = [(:right, :center) for i in 1:N]
8484
align[findfirst(isequal("Revise"), packages)] = (:left, :center)
85-
align[findfirst(isequal("LoweredCodeUtils"), packages)] = (:right, :top)
86-
align[findfirst(isequal("CodeTracking"), packages)] = (:left, :bottom)
87-
align[findfirst(isequal("JuliaInterpreter"), packages)] = (:left, :bottom)
88-
align[findfirst(isequal("Requires"), packages)] = (:left, :bottom)
89-
90-
## shift "JuliaInterpreter" node in data space
91-
offset = [Point2f(0,0) for i in 1:N]
92-
offset[findfirst(isequal("JuliaInterpreter"), packages)] = Point(-0.1, 0.1)
85+
align[findfirst(isequal("LoweredCodeUtils"), packages)] = (:center, :top)
86+
align[findfirst(isequal("CodeTracking"), packages)] = (:left, :top)
87+
align[findfirst(isequal("JuliaInterpreter"), packages)] = (:center, :bottom)
88+
align[findfirst(isequal("TOML"), packages)] = (:center, :top)
89+
align[findfirst(isequal("Preferences"), packages)] = (:center, :top)
9390

9491
f, ax, p = graphplot(g; layout=lay,
9592
arrow_size=15,
@@ -98,13 +95,13 @@ f, ax, p = graphplot(g; layout=lay,
9895
nlabels_align=align,
9996
nlabels_distance=10,
10097
nlabels_fontsize=15,
101-
nlabels_offset=offset,
10298
node_size=[9.0 for i in 1:N],
10399
edge_width=[3 for i in 1:ne(g)],
104100
waypoints=wp,
105101
waypoint_radius=0.5)
106102
ax.title = "Dependency Graph of Revise.jl"
107103
xlims!(ax, -0.6, 5.6)
104+
ylims!(ax, -1.9, 1.7)
108105
hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect()
109106
f #hide
110107

0 commit comments

Comments
 (0)