MakieOrg / GeoMakie.jl

Geographical plotting utilities for Makie.jl
https://geo.makie.org
MIT License
167 stars 24 forks source link

Bug adding text to GridLayout introduced in v0.6 #201

Closed Zetison closed 3 months ago

Zetison commented 7 months ago

A bug introduced in v0.6 (and not fixed in v0.6.1) can be reproduced by using GLMakie, GeoMakie; fig = Figure(); layout = fig[1,1] = GridLayout(); ax = GeoMakie.GeoAxis(layout[1,1]); text!(ax, 0.0, 0.0, text = "test"); display(fig) with error message ERROR: MethodError: no method matching point_iterator(::MakieCore.Text{Tuple{Vector{Makie.GlyphCollection}}})

asinghvi17 commented 7 months ago

This is a Makie issue unfortunately - that particular method wasn't implemented there. I can monkeypatch it on master but would probably open a PR to fix it there...

asinghvi17 commented 7 months ago

For now, you can simply define:

Makie.point_iterator(::Makie.MakieCore.Text{Tuple{Vector{Makie.GlyphCollection}}}) = Point2f[]

which worked for me (temporarily, of course, since the ideal fix would be to get the text's position)

apriljunge commented 6 months ago

Just in case someone has the same problem: This fixes issues with brackets too

asinghvi17 commented 3 months ago

Looks fixed to me after #207 and Makie v0.21, feel free to reopen if you still encounter this