Skip to content

Commit 045d3d1

Browse files
authored
Merge pull request #213 from MakieOrg/compathelper/new_version/2025-06-12-01-13-35-616-00230053974
2 parents 426ee70 + 7bbb374 commit 045d3d1

11 files changed

Lines changed: 29 additions & 12 deletions

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ SimpleTraits = "699a6c99-e7fa-54fc-8d76-47d257e15c1d"
1515
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1616

1717
[compat]
18+
CairoMakie = "0.14"
1819
DataStructures = "0.17, 0.18"
19-
CairoMakie = "0.13"
2020
FileIO = "1"
2121
GeometryBasics = "0.5"
2222
Graphs = "1.4"
2323
Literate = "2"
24-
Makie = "0.21, 0.22"
24+
Makie = "0.23"
2525
NetworkLayout = "0.4.9"
2626
PolynomialRoots = "1"
2727
ReferenceTests = "0.10"

assets/interactions.jl-02.png

8.72 KB
Loading

assets/interactions.jl-03.png

8.84 KB
Loading

assets/interactions.jl-04.png

8.55 KB
Loading

assets/interactions.jl-05.png

8.15 KB
Loading

assets/interactions.jl-06.png

9.3 KB
Loading

assets/scenegraph.jl-01.png

20 KB
Loading

docs/Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
2121
WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008"
2222

2323
[compat]
24-
CairoMakie = "0.13"
24+
CairoMakie = "0.14"
2525
Cbc = "1"
2626
DataStructures = "0.18"
2727
DecisionTree = "0.12"
@@ -32,10 +32,10 @@ JSServe = "2"
3232
LayeredLayouts = "0.2"
3333
Literate = "2"
3434
MLJ = "0.20"
35-
Makie = "0.22"
35+
Makie = "0.23"
3636
NetworkDynamics = "0.9"
3737
NetworkLayout = "0.4.7"
3838
OrdinaryDiffEqTsit5 = "1"
3939
RegistryInstances = "0.1"
4040
StableRNGs = "1"
41-
WGLMakie = "0.11"
41+
WGLMakie = "0.12"

docs/examples/interactions.jl

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,25 @@ nhover = NodeHoverHandler(node_hover_action)
4444
register_interaction!(ax, :nhover, nhover)
4545

4646
function set_cursor!(p) #hide
47-
direction = Point2f(-0.1, 0.2) #hide
48-
arrows!([p-direction], [direction], linewidth=3, arrowsize=20, lengthscale=0.7) #hide
47+
θ = π/8 # rotation angle #hide
48+
R = Float32[cos(θ) -sin(θ); sin(θ) cos(θ)] #hide
49+
scale = 3 #hide
50+
full_height = 0.8 #hide
51+
head_height = 0.6 #hide
52+
inner_height = 0.5 #hide
53+
head_width = 0.6 #hide
54+
tail_width = 0.15 #hide
55+
arrow = scale * Point2f.([ #hide
56+
( 0.0, 0.0), #hide
57+
(-head_width/2, -head_height), #hide
58+
(-tail_width/2, -inner_height), #hide
59+
(-tail_width/2, -full_height), #hide
60+
( tail_width/2, -full_height), #hide
61+
( tail_width/2, -inner_height), #hide
62+
( head_width/2, -head_height), #hide
63+
]) #hide
64+
rotated_arrow = Makie.Polygon([Point2f(R * Vec(p)) for p in arrow]) #hide
65+
scatter!(p; marker=rotated_arrow, color=:black, strokecolor=:white, strokewidth=1) #hide
4966
end #hide
5067
nodepos = copy(p[:node_pos][]) #hide
5168
set_cursor!(nodepos[5] + Point2f(0.05, 0)) #hide

test/beziercurves_test.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ using GraphMakie: BezierPath, MoveTo, LineTo, CurveTo, interpolate, discretize,
2121
pos = map(t->interpolate(path,t), ts)
2222
tan = map(t->tangent(path,t), ts)
2323

24-
scatter!(pos)
25-
arrows!(pos, tan; lengthscale=0.1)
26-
2724
path = BezierPath([
2825
MoveTo(Point3f(0,0,0)),
2926
LineTo(Point3f(1,0,0)),
@@ -34,7 +31,6 @@ using GraphMakie: BezierPath, MoveTo, LineTo, CurveTo, interpolate, discretize,
3431
pos = map(t->interpolate(path,t), ts)
3532
tan = map(t->tangent(path,t), ts)
3633
fig, ax, p = scatter(pos)
37-
arrows!(pos, tan; lengthscale=0.1)
3834
end
3935

4036
@testset "natural spline constructor" begin

0 commit comments

Comments
 (0)