# GLMakie issue with select\_rectangle

**URL:** <https://discourse.julialang.org/t/glmakie-issue-with-select-rectangle/119008>\
**Category:** Visualization\
**Created:** [September 3, 2024, 8:29pm UTC](https://discourse.julialang.org/t/glmakie-issue-with-select-rectangle/119008 "2024-09-03T20:29:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sc-dyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sc-dyer/32/209461_2.png) [@sc-dyer](https://discourse.julialang.org/u/sc-dyer)\
**Post date:** [September 3, 2024, 8:29pm UTC](https://discourse.julialang.org/t/glmakie-issue-with-select-rectangle/119008/1 "2024-09-03T20:29:14Z")

</div>

I was trying to run a GLMakie script that used to work but doesn’t any more. Here is a reproduction of the error I am getting:

```julia
using GLMakie

fig = Figure(); display(GLMakie.Screen(),fig)
ax = Axis(fig[1,1])

lines!(ax, [1,2,3],[3,2,1])

sRange = select_rectangle(ax.scene)

on(sRange) do rect
    x1 = rect.origin[1]
    x2 = rect.widths[1] + x1
    @show x1, x2
end

```

When I run it and try to select a rectangle, it returns this error:

```julia
MethodError: (Vec2)(::Vec{2, Float32}) is ambiguous.

```

I checked the API to see if something changed in the implementation but that doesn’t appear to be the case, but it is very likely I missed something. Has anyone encountered this before?

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [September 3, 2024, 10:43pm UTC](https://discourse.julialang.org/t/glmakie-issue-with-select-rectangle/119008/2 "2024-09-03T22:43:42Z")

</div>

Can you try:

> <https://github.com/MakieOrg/Makie.jl/pull/4312>
>
> Fixes https://discourse.julialang.org/t/glmakie-issue-with-select-rectangle/1190…08
> Although I don't fully understand why xy isnt a tuple in that error.

---

<div class="post-metadata">

**Author:** ![sc-dyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sc-dyer/32/209461_2.png) [@sc-dyer](https://discourse.julialang.org/u/sc-dyer)\
**Post date:** [September 4, 2024, 3:52pm UTC](https://discourse.julialang.org/t/glmakie-issue-with-select-rectangle/119008/3 "2024-09-04T15:52:44Z")

</div>

This worked, thank you so much!
