Skip to content

Commit

Permalink
Merge pull request #83 from greimel/refimages
Browse files Browse the repository at this point in the history
Update reference images (against PR #73)
  • Loading branch information
hexaeder authored Jul 18, 2022
2 parents c13be8d + b4bcde3 commit 71f59be
Show file tree
Hide file tree
Showing 24 changed files with 14 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
Manifest.toml
/docs/Manifest.toml
/docs/src/generated/
.vscode
.DS_Store
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GraphMakie"
uuid = "1ecd5474-83a3-4783-bb4f-06765db800d2"
authors = ["Simon Danisch", "Hans Würfel"]
version = "0.3.3"
version = "0.3.6"

[deps]
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
Expand All @@ -14,7 +14,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
[compat]
GeometryBasics = "0.4"
Graphs = "1.4"
Makie = "0.15, 0.16.4"
Makie = "0.17.4"
NetworkLayout = "0.4.3"
StaticArrays = "1.2"
julia = "1"
Expand Down
Binary file modified assets/plots.jl-04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/plots.jl-05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/plots.jl-06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/plots.jl-07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/plots.jl-12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/plots.jl-13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/plots.jl-14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/plots.jl-15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/reftests.jl-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/reftests.jl-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/reftests.jl-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/reftests.jl-04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/reftests.jl-05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/reftests.jl-06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/reftests.jl-07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/syntaxtree.jl-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/syntaxtree.jl-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
GraphMakie = "1ecd5474-83a3-4783-bb4f-06765db800d2"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
Expand All @@ -14,5 +15,6 @@ PkgDeps = "839e9fc8-855b-5b3c-a3b7-2833d3dd1f59"
WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008"

[compat]
Cbc = "1.0.1"
LayeredLayouts = "0.2"
NetworkDynamics = "0.7"
2 changes: 1 addition & 1 deletion docs/examples/plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ tangents = Dict(1 => ((1,1),(0,-1)),
tfactor = [0.5, 0.75, (0.5, 0.25)]
f, ax, p = graphplot(g; layout=SquareGrid(cols=3), tangents, tfactor,
arrow_size=20, arrow_show=true, edge_color=[:red, :green, :blue],
elabels="Edge ".*repr.(1:ne(g)), elabels_distance=10)
elabels="Edge ".*repr.(1:ne(g)), elabels_distance=20)
hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect()
plot_controlpoints!(ax, p) # show control points for demonstration
@save_reference f #hide
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/reftests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ p[:nlabels_offset][] = [Point2(.1*cos(-2π/9*i),.1*sin(-2π/9*i)) for i in 1:nv(

# draw some edge labels
g = path_graph(4)
elabels = ["𐄂" for i in 1:ne(g)]
elabels = ["a" for i in 1:ne(g)]
elabels_align = (:center, :center)
fig, ax, p = graphplot(g; layout=SquareGrid(), elabels, elabels_align,
elabels_color=:red)
Expand All @@ -57,7 +57,7 @@ hidedecorations!(ax)
p[:elabels][] = repr.(edges(g))
p[:elabels_shift][] = [0.25, 0.5, 0.75]
p[:elabels_rotation][] =/8, 0, -π/8]
p[:elabels_offset][] = Point2(0.1,0.1)
p[:elabels_offset][] = Point2(0.05,0.05)
p[:elabels_textsize][] = 10
autolimits!(ax)
@save_reference fig
Expand Down
2 changes: 1 addition & 1 deletion src/interaction.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Makie: ScenePlot
import Makie.MakieLayout: registration_setup!, process_interaction
import Makie: registration_setup!, process_interaction

export NodeHoverHandler, EdgeHoverHandler
export NodeHoverHighlight, EdgeHoverHighlight
Expand Down
7 changes: 4 additions & 3 deletions src/recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,11 @@ function Makie.plot!(gp::GraphPlot)

# create array of pathes triggered by node_pos changes
# in case of a graph change the node_position will change anyway
edge_paths = lift(node_pos, gp.selfedge_size,
gp[:edge_paths] = lift(node_pos, gp.selfedge_size,
gp.selfedge_direction, gp.selfedge_width) do pos, s, d, w
find_edge_paths(graph[], gp.attributes, pos)
end
edge_paths = gp[:edge_paths]

# plot edges
edge_plot = edgeplot!(gp, edge_paths;
Expand All @@ -219,7 +220,7 @@ function Makie.plot!(gp::GraphPlot)
color = gp.edge_color,
rotations = arrow_rot,
strokewidth = 0.0,
markerspace = Pixel,
markerspace = :pixel,
visible = arrow_show,
gp.arrow_attr...)

Expand Down Expand Up @@ -427,7 +428,7 @@ function find_edge_paths(g, attr, pos::AbstractVector{PT}) where {PT}
return convert(Vector{T}, paths)
elseif ne(g) > 500
attr[:edge_plottype][] = :linesegments
@warn "Since there are a lot of edges ($N > 500), they will be drawn as straight lines "*
@warn "Since there are a lot of edges ($(ne(g)) > 500), they will be drawn as straight lines "*
"even though they contain curvy edges. If you really want to plot them as "*
"bezier curves pass `edge_plottype=:beziersegments` explicitly. This will have "*
"much worse performance!"
Expand Down

0 comments on commit 71f59be

Please sign in to comment.