heliosdrm / GRUtils.jl

Tools for using the GR framework in Julia
Other
31 stars 6 forks source link

annotation ignores NDC coordinate requests #84

Closed steven-varga closed 3 years ago

steven-varga commented 3 years ago

annotations( 0, 0, "--- origin ---- ", wc=false) plots in world coordinates as opposed to NDC possible modification in geometries.jl

function draw(g::Geometry, ::Val{:text})::Nothing
    wc = Bool(get(g.attributes, :wc, true))
    text(g.x[1], g.y[1], g.label, wc)
end

and adding :wc to const KEYS_GEOM_ATTRIBUTES = [..., :wc] within frontend.jl fixes the problem.

heliosdrm commented 3 years ago

Hi, sorry I had missed this one. I'll address it as soon as I have time to test it.